Sitecore Commerce Series: Exploring Reference Storefront

Sitecore Commerce 8.2.1 comes along with a sample solution which is supposed to be used as a reference:Sitecore Reference Storefront Powered by Sitecore Commerce

The last update package (Sitecore.Reference.Storefront.Powered.by.SitecoreCommerce.10.2.65.zip) which is part of the Commerce installation package contains the sample web store
Once you install the update package and the two Sitecore packages with the images:

Adventure Works Images.zip

Sitecore.Commerce.Habitat.Images-1.0.0.zip

you will have the Storefront shop installed on your Sitecore instance.

Commerce.Server.Storefront.sln – containing the Storefront shop implementation plus 2 TDS Projects containing
the definition and content items, part of the Storefront website. If you have installed the Storefront update package you already
have these items

In this blogpost I will use the first solution: Commerce.Engine.Storefront.sln

The solution consists of 3 different projects:

Commerce.Storefront

This is the main web project which contains the controllers used for the site components. Other interesting parts of it are the Managers related to the web store features like OrderManager, PricingManager, ShippingManager and others. They give really good examples of the Commerce API which unfortunately is not so well documented.

Common

While Commerce.Storefront stores the controllers, this project contains mostly the models constructed by the controllers.
There are some utils helpers, extension methods and other more common managers in the Common project as well.

CommonSettings

The common settings project, which is a web project as well, focuses on the front-end of the application. It contains the View files, the CSS and JavaScript files.

The Commerce Storefront solution is not structured in the best possible way (even the file structure is misleading) but it gives a really good overview for
the features for Commerce Engine and Commerce Connect module . All the available code examples help developers to get real idea of Sitecore Commerce and its API.
A new version of the Storefront solution will be released together with Sitecore Commerce 9.