How to install and configure NopCommerce shopping cart application.
First you need to go to http://www.nopcommerce.com website. On the home page you can find a link to “Download for Free”, see the below Figure 1 for the reference.
Now click on the download for free button and it will lead you to the http://www.nopcommerce.com/downloads.aspx page. On the download page you can see various option to download as displayed in the below Figure 2
Here we need to download source code (highlighted option) which is around 115 MB of the code. It is a full working source code. Now if you go to download folder once it is completed you will see a zip file for source code. In this article we will use NopCommerce version 3.80
If you extract .rar file the you will get the visual studio solution for NopCommerce along with some other folders. This NopCommerce solution contains See the below Figure 3 for reference.
Now click on NopCommerce.sln file which will open the solution in Visual Studio. Here I am using Visual Studio 2015 Community Edition, Check you version compatibility with NopCommerce 3.80
Once solution file is open then all the projects are loaded into solution explorer as below Figure 4
Understanding NopCommerce Source code Architecture
Figure 4 shows the architecture of NopCommerce project, there are main 4 folders Libraries, Plugins, Presentation and Tests.
Lets see 1 by 1 folder first of all there is a “Tests” folder which contains 5 different project for test cases. Here we do not need it so we will not explore it here.
Second folder is the main folder “presentation” it has 3 different project 1 (Nop.Web) is for E-commerce store for the clients, 2(Nop.Admin) is for store admin (owner) and last 3 “Nop.Web.Framework” it has some common feature which will be used for above both project.
Third is Plugins folder, in this folder there some built in plugins they have provided. We will explore this feature in detail in our next article “How to write NopCommerce plugins”.
Now 4th folder is for “Libraries” which has 3 projects and that is for core features, data models and services. Those are also not in the scope of this article.
Now lets install NopCommerce on our local system by running the project. Please press F5 on the keyboard and you will see the screen like below Figure 5.
Now in the input box marked with number 1, is for store admin email address, you need to enter here you valid email address so it will be used later if you forgot your password and etc. In the input box marked with number 2 and number 3, enter password both password must be the same, and please create a complex password which is never easy to guess. Now select the check box labeled with “Create Sample Data” marked with number 4 if you wish to create sample data also, else leave it blank.
For number 5 it is a database setting, if you wish to use built in data storage (SQL Server Compact edition) the select a radio button labeled with “Use build-in data storage(SQL Server Compact)” or if you have already installed an SQL server or SQL express then choose the radio button marked with number 5.
If you have not created a blank data base in SQL server or SQL express then check the check box marked with number 6 (Create database if it doesn’t exist).
In the input marked with number 7 and 8 you need to enter SQL server name and database name respectively if you wish to use setting “Enter SQL Connection Value” option else you can enter sql raw connection string by selecting “Enter raw connection string (advanced). For authentication you can use either SQL server authentication by entering SQL server user name and password into input box labeled with 9 and 10 or you can use integrated windows authentication. Now finally click on the install button at the bottom right of the page marked with 11 and you are done. In the browser you can see the store is running with sample items.
NopCommerce is installed successfully.