Last updated: Aug 21 2013

Area: Episerver Commerce Applies to versions: Latest

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.

  1. Follow the steps 1-4 in Creating a starter project to create an empty project with CMS. This will be the front-end site.
  2. In Visual Studio, right-click on References in your project, and select Manage NuGet Packages.
  3. 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.
  4. Go to File and add a new project of type ASP.NET Empty Web Application to the solution.
  5. On the new empty site project, right-click References and select Manage NuGet Packages.
  6. Find and click Install for the EPiServer.CommerceManager package. This adds the Commerce Manager back-end components to the project.
  7. Find and click Install for the EPiServer.ServiceLocation.StructureMap package. This adds an implementation of the ServiceLocation / Dependency Injection framework.
  8. In Visual Studio's Package Manager Console, run the command update-epidatabase.
  9. Build your solution, set the front-end site as StartUp Project, then start the site (Ctrl + F5)).
  10. 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. 
  11. After all migration steps are completed, browse the site to verify that it works.
  12. 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.

Next steps

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.

Comments

Outdated documentation? 

From step 7. "Find and click "Install" for the EPiServer.ServiceLocator.StructureMap package. This adds an implementation of the ServiceLocation / Dependency Injection framework."

@Magnus - might just be a typo. Looks like it should be: EPiServer.ServiceLocation.StructureMap

Think it's a typo, updated now, thanks for the feedback.