Click here to Skip to main content
15,885,366 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I'm real new to this whole MVC thing. I'm doing a web site that has an eCommerce component and was wondering how you integrate the eCommerce code into an existing site. It seems as if every eCommerce solution out there is written under the assumption that it IS the web site. Is that typical?

Finally, I was thinking of using SmartStore (a fork of nopCommerce) for the eCommerce component. Does anyone have any comments/experience with this?
Posted

1 solution

Well, the web app and web site is a very broad topic and no conclusion can be made in a positive manner out of the long term discussion. But, as always, I would suggest that you give MSDN a thorough look to learn the difference between Web app and Web site[^].

After that, the deployment is pretty easy, you paste the binaries (assemblies) into the bin folder. Then, the rest of the pages depend on your framework. ASP.NET exposes two different frameworks (Web Pages and MVC)*, both are based on different conventions. Mostly the Web Pages framework is targeted as Websites, and MVC is targeted for Web application. Before, I tell how to deploy the source code, if you want to learn the MVC itself, please read: Novice to MVC? Read this…[^]. Also, for novice ASP.NET MVC developers I have another article, that targets the beginners, you might be interested in it: Understanding ASP.NET MVC using real world example, for beginners and intermediate[^].

That said, you need to know that the application consists of assemblies, HTML files, code-behind (the C# files). Now, the deployment (if done manually; I don't know of any automatic process) of the website to web app would be like,

bin                             --> bin
HTML files (.cshtml or .vbhtml) --> Views/ControllerName/(as HTML files)
Code behind (.cs)               --> Controllers/(in the form of Controllers for your app)


Finally make a few changes to your web.config as per SmartStore requires you to, and you're done. :)

*Only until ASP.NET 4.5, ASP.NET 5 introduces ASP.NET MVC 6 which holds the power of ASP.NET Web Pages, ASP.NET MVC and ASP.NET Web API with SignalR and Entity Framework as a plus feature. Also the Web Forms is not included.
 
Share this answer
 
Comments
#realJSOP 13-Jun-15 14:35pm    
I said I'm new to MVC, not a complete f*ckin idiot. I have an existing MVC web site (or app or whatever you feel like calling it). I don't want to lose that site. Can I add something like smartstore to it without overwriting the existing folders/files?
Afzaal Ahmad Zeeshan 13-Jun-15 14:42pm    
I know John, I also did not consider you as a complete f*ckin' idiot. :D

The code block, that I have suggested, tells you that you can deploy the existing code from one website to another. Also, I believe the SmartStore would be a library, or assembly. If so, add the library file to bin or (App_Code) and you are good to go.

If no, then you can add a separate controller over your existing one and continue the procedure. You have also not shared any procedure how you want to accomplish the task. The source code is available as GitHub repository, do you intend to use it? Perhaps, rest of the scenario is clear to you also! :-)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900