Sitecore Commerce 8.2.1 uses a Commerce Server Catalog service to store information about products. This service can be accessed using the Catalog Manager tool, the Merchandising Manager SPEAK application, or the Sitecore Content tree, under
According to the Deployment Guide section Default Commerce Engine service settings it should be possible to change the URL where this catalog is kept. (I was setting up a second instance, and wanted the new catalog to not interfere with an earlier one.) After changing the URL and following the deployment steps, a new catalog was created, but it was not referenced by Sitecore or the Commerce Engine.
- In an earlier attempt to set up Commerce Server, I had created a Commerce Server site called
CFSolutionStorefrontSite. My aim with this attempt was to set up a site called
- The Deployment Guide indicates making the following changes to change a Commerce Server catalog site:
The Commerce Authoring service references the Commerce Server Catalog web service, whose default address is http://localhost:1004/CFSolutionStorefrontSite_CatalogWebService/CatalogWebService.asmx. If you need to change the hostname or port for your deployment, you must change the references to the Commerce Server Catalog web service in the following files: CommerceAuthoring\wwwroot\bootstrap\Global.json CommerceAuthoring\wwwroot\data\Environments\PlugIn.Habitat.CommerceAuthoring-1.0.0.json Default Commerce Engine service settings
- Accordingly, I changed this URL
http://localhost:1004/storefront2_CatalogWebService/CatalogWebService.asmxin the documented JSON locatins.
- After making these changes, and following the Deployment Guide process, I found that a Commerce Sever site was created (e.g. SQL Server tables with names like Storefront2_productcatalog were created, and I could open the catalog by setting Commerce Server Catalog Manager to the new URL.
- On closer inspection, I found that the Reference Storefront was using products from catalog Habitat_Master, and this catalog was only available in the original CFSolutionStorefrontSite. I confirmed that Sitecore and CommerceEngine were pointing to this site by changing a product description using Catalog Manager, and seeing that change using the CommmerceEngine APIs (using Postman) and in the Content Editor.
- I have confirmed that the settings in
Plugint.Habitat.CommerceAuthoring.1.0.01.jsonhave been persisted to the SitecoreCommerce_Global Entities table. I was not able to locate where the Global.json values are persisted, so assume they are kept in memory.
- Both sites appear in Commerce Server Manager, and I see no difference to how they are configured there.
What changes are required to point the CommerceEngine to a new Commerce Server site? The documented URL changes are insufficient.
I noticed that the Sitename is a setting in both of the Json files listed above, as is a reference to the SQL database where the catalog is stored:
I changed all catalog related Sitename entries in the two JSON files indicated above (PlugIn.Habitat.CommerceAuthoring-1.0.0.json, Global.json), and reran the Bootstrap step. This resulted in the Habitat_Master catalog getting created at the desired URL, but Sitecore still points to the original location.