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
you will have the Storefront shop installed on your Sitecore instance.
The source code of the Storefront implementation is available on GitHub: https://github.com/Sitecore/Reference-Storefront
When you are cloning the repository make sure you are using the appropriate release for your Sitecore Commerce version:
You can find two different solution files in the repository:
Commerce.Engine.Storefront.sln – containing the Storefront shop implementation
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:
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.
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.
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.