4

Summary

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 /sitecore/Commerce/Catalog Management/Catalogs.

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.

Details

  • 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 storefront2.
  • 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/CFSolutionStorefrontSite_CatalogWebService/CatalogWebService.asmx to this http://localhost:1004/storefront2_CatalogWebService/CatalogWebService.asmx in 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.json have 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. enter image description here

Question

What changes are required to point the CommerceEngine to a new Commerce Server site? The documented URL changes are insufficient.

Update

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.

1
  • Did you try using commerce server manager (or csconfig) to make the needed changes? Is your site showing up there? And then indeed change the sitename in commerce.config Commented Nov 25, 2017 at 18:32

1 Answer 1

3

Also, make sure to update the Commerce Site name in the CommerceServer.Core.config in your Sitecore Website/App_Config folder.

<application **siteName="<CommerceSiteName>"** debugLevel="Production" />

Best, Hetal

1
  • This was the issue. Thanks! (This should be in the Deployment Guide. Will pass this on to the documentation team.) Commented Nov 25, 2017 at 20:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.