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". 









No comments:

Post a Comment

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...