Use the customer sample solution
Sitecore Experience Commerce (XC) includes a sample solution that you can use as a starting point for extending the Commerce Engine. This sample solution (
Customer.Sample.Solution) is part of the
Sitecore.Commerce.Engine.SDK. Sitecore also provides a sample plugin project template, which is available from the Official Sitecore Commerce NuGet Feed.
When you work with the
Sitecore.Commerce.Engine.SDK, you must use Visual Studio 2019.
Sitecore.Commerce.Engineproject (an ASP.NET Core host).
Sample plugins, including:
Plugin.Sample.AdventureWorks- sample data that you can use to develop and test your solution.
Plugin.Sample.Habitat- sample data that you can use to develop and test your solution.
Plugin.Sample.Payments.Braintree- working Braintree payment integration.
Sitecore.Commerce.Engine.SDK also contains the
Sitecore.Commerce.Sample.Console.sln, which is a sample console application 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 unnecessary 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.
To use the customer sample solution:
Sitecore.Commerce.Engine.SDK.*.*.*.ZIParchive, which is included in the Sitecore XC Release Package, as part of the
By default, Microsoft sets the maximum length for a path (file name and its directory route) to 260 characters. As a result, it is important that you keep the folder path and names for the extracted files as short as possible.
From the Official Sitecore Commerce NuGet Feed, download the following package:
To install the sample plugin template, open Windows Powershell as an Administrator, and run the following command:RequestResponseshell
dotnet new -i "<path>\Sitecore.Commerce.Plugin.Template.*.*.*.nupkg"
dotnet new -i "C:\Sitecore.Commerce.Plugin.Template.*.*.*.nupkg". This installs the Sitecore Commerce Sample Plugin template as shown in the following image.
In Visual Studio, open the
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.
To verify you have a working system, in the Solution Explorer, right-click the
Customer.Sample.Solutionand click Build Solution.
If it builds successfully, you are now ready to create your plugin.