The Commerce Engine is a thin ASP.NET Core application that serves as a host for a group of micro-services that enable commerce fqunctionality. These services are loosely coupled with each other and together, they provide a robust, extensible set of commerce-enabling services.
Services exposed from the engine are exposed as OData/REST based APIs. This enables either direct REST calls to the services, or calls through a generated smart proxy, which examines OData metadata and generates a strongly typed experience for accessing the service.
The initial out-of-the-box Commerce Engine is provided as part of the Sitecore XC SDK. It enables a developer to extend their solution by choosing which plugins are enabled in their solution.
The Commerce Engine provided in the SDK is called the Customer.Sample.Solution. You can open the Commerce solution in Visual Studio 2017. The SDK contains the Commerce Engine project itself and some sample plugins that demonstrate a typical extension of the solution.
In the following example, the plugin is added to the PluginSamples folder in SDK.
Do not try to add your plugin to a folder outside SDK, as the file paths can conflict with proper builds:
The system displays three errors (simple fix-up errors).
using Sitecore.Framework.Pipelines.DefinitionExtensions;
your Visual Studio project should build successfully.
Once the plugin builds, you must add it to the Sitecore Commerce Engine project as a reference so that the plugin will be pulled in during a build/publish:
When the file is saved, it resolves the dependency and loads it when the application is launched.
Happy plugin development ????
Contact us for more details ketan@addact.net.