Friday, February 5, 2021

Simplest Way To Debugging Sitecore Commerce Engine

Different ways to debug sitecore commerce engine:


1. Processor:(This is the easiest way to debug Commerce)
Debug Sitecore Commerce Engine solution by attaching process in a same way as we do for Sitecore. 
Not w3wp.exe but by attaching Sitecore.Commerce.Engine.exe process.

processor



2. Hosting through Visual Studio
 Stop Commerce Authoring in IIS and Run Sitecore Commerce Solution from Visual Studio after making below changes in Sitecore Commerce Engine project:
    a. Set Profile to Engine
    b. Set App Url to Commerce Authoring url

Sitecore Commerce VS

























Then if everything is good, commerce engine will start running from Visual Studio.
authoring logs in cmd


Tuesday, February 2, 2021

Creating Custom Domain in Headless Sitecore Commerce

Domain For Commerce User and Customer

Usually we configure domain name for Sitecore Commerce SxA sites in Powershell tool's SxA Site Manager or in Site Grouping item of storefront site for commerce user. But if we are going we headless sitecore commerce setup and having SxA will not make sense. So Powershell tool's SxA Site Manager or in Site Grouping item will not be part of Sitecore Commerce setup.









To have our domain for commerce user and customer, we need to remove Sitecore Commerce Domain provider, adding custom domain class. Below is the example:

Domain config
Deleting out of box domain




Headless Custom Domain
Adding custom domain






Code for Domain
Code for overriding domain class with new domain name


In above code snippet we are setting domain name to "Headless" from default "Commerce User". 









Wishlist in Sitecore Commerce

In e-commerce, wishlist or saved products for later purchase is one of the important functionality. I have created simple plugin in sitecore...