Create your first plugin
You can create your first Commerce Engine plugin using the Customer.Sample.Solution
that is included as part of the Sitecore.Commerce.Engine.SDK
.
For information on the compatibility of Sitecore XC with browsers, operating systems, .NET frameworks, and database servers, see the Sitecore compatibility table.
To create your first plugin:
Install and build the Customer.Sample.Solution before starting this procedure.
-
To add your custom plugin to the
Customer.Sample.Solution
, go to\Sitecore.Commerce.Engine.SDK\src
folder. -
Right-click and create a new folder for the plugin, for example MyPlugin.
-
In Windows Powershell, go to the new folder you just created, and run the following command:
RequestResponsedotnet new pluginsample -o <relative path to project directory>/<project name>
-
Go to the folder where you created the new plugin and rename the
Sitecore.Commerce.Plugin.Sample.csproj
file to your project name.NoteTo resolve namespaces within the project, use a tool, such as Notepad++, to replace all references of
Sitecore.Commerce.Plugin.Sample
to your project name, for example Foundation.MyPlugin.Engine. -
To add this plugin to the sample solution, in Visual Studio, in the Solution Explorer, right-click the src folder and click Add Existing Project.
-
In the Add Existing Project dialog box, go to the <MyPlugin> folder, click
Sitecore.Commerce.Plugin.Sample.csproj
file and click Open. -
In the Solution Explorer, right-click the
Customer. Sample.Solution
and click Build Solution.