Getting the Customer.Sample.Solution up and running
Sitecore Experience Commerce (XC) provides a Visual Studio extension (as part of the Sitecore.Commerce.Engine.SDK
) that creates project templates that facilitate the creation of your custom Sitecore XC plugins. This topic details the steps you perform to create an initial Commerce Engine solution using the Customer.Sample.Solution up and running:
-
On the machine where you have Visual Studio installed, open the Commerce.Commerce.Engine.SDK folder.
-
Double-click
Sitecore.Commerce.Plugin.vsix
.The VSIX installer installs the extension to Visual Studio. This creates the required solution folder structure for your custom plugin project.
-
In Visual Studio, open the
Customer.Sample.Solution.sln
solution.This is the Visual Studio solution that you use to develop plugins for the Commerce Engine, and to build and deploy a new instance of the Engine.
-
You can rename the solution to conform to the naming standards of your company.
-
Press F5 to run the Engine in Visual Studio in debug mode.
As you develop a plugin, you can interactively debug your plugin using Visual Studio:
The Customer.Sample.Solution
contains the Sitecore.Commerce.Engine
project (an ASP.NET Core host), and several sample plugins, including the Plugin.Sample.Habitat
plugin, the Plugin.Sample.Payments.Braintree
plugin, and the Sitecore.Commerce.Plugin.AdventureWorks
plugin. As you develop your custom plugin, you can run your extended solution through a set of sample orders to test the plugin functionality.
The Sitecore.Commerce.Sample.Console.sln
is a simple console tool that provides samples, and allows the end-to-end demonstration and functional tests of standard scenarios. You can load it in a second Visual Studio instance, and enhance it by either removing unneeded scenarios, or adding your own to test specific scenarios. This is useful for quick and iterative development of extensibility and integration. You can build and test back-end scenarios without running Sitecore.
Before you perform any extensibility, run the Customer.Sample.Solution
to host the Engine to make sure that you have a working system. Also, to ensure that all existing functionality can be used, run the console tool. This is important to make sure that you are starting from a known working state, and do not confuse issues that are related to set up, with issues that are caused by your extension.