Last updated: Aug 21 2013
2. Creating your project
For better control and understanding, it is recommended to start developing in an empty project. However, you can install a site with sample templates to explore and use for inspiration. The Episerver Visual Studio extension configured with NuGet packages provide a pre-configured website with CMS, and a Visual Studio project for development, to which you add the Commerce components through NuGet.
Note: If you install a project outside the default location Documents\Visual Studio\Projects, ensure that the current user has write permission to the parent directory to which you are installing. SQL LocalDB does not respect the Administrators group.
Creating the project
Episerver Commerce is based on two sites: a front-end (CMS) site and a back-end (Commerce Manager) site. In this example, we create an MVC-based project, but the procedure is similar for Web Forms.
- Follow the steps 1-4 in Creating a starter project to create an empty project with CMS. This will be the front-end site.
- In Visual Studio, right-click on References in your project, and select Manage NuGet Packages.
- Select EPiServer under Online, click Install for the packages EPiServer.Commerce and EPiServer.Commerce.UI.ManagerIntegration, and click Close. This adds the Commerce front-end components.
- Go to File and add a new project of type ASP.NET Empty Web Application to the solution.
- On the new empty site project, right-click References and select Manage NuGet Packages.
- Find and click Install for the EPiServer.CommerceManager package. This adds the Commerce Manager back-end components to the project.
- Find and click Install for the EPiServer.ServiceLocation.StructureMap package. This adds an implementation of the ServiceLocation / Dependency Injection framework.
- In Visual Studio's Package Manager Console, run the command update-epidatabase.
- Build your solution, set the front-end site as StartUp Project, then start the site (Ctrl + F5)).
- You should be redirected to the migration view. If you are asked to log in, use the default credentials admin/store, and follow the instructions to run all the migration steps.
- After all migration steps are completed, browse the site to verify that it works.
- Set your Commerce Manager back-end site as StartUp Project, start the site (Ctrl+F5), and verify that you can log in with the default credentials.
The project structure
The installed folder structure is similar to a "plain" CMS site, except there are two sites, back-end and front-end, and an Infrastructure folder containing InitializationModule.
The initialization module ensures that the catalog structure is added under the site's root level.
Updating to the latest
See Installing Episerver updates to add the latest updates to a Commerce site.
Go to Creating a start page to create a start page. This will be the starting point for displaying product content on your e-commerce website.