Use a custom product repository name or location

Current version: 9.0

When you set up Sitecore to integrate with an external commerce system that uses product synchronization, you must create a product repository. The default name and location for the product repository is /sitecore/content/Product Repository. If you want to use a custom product repository name or location, you must adjust the configuration.

Note

It is best practice to store the product repository in its own folder under /sitecore/content to avoid getting it mixed up with the websites that are typically stored under /sitecore/Content/.

To use a custom product repository name or location:

  1. In the /App_Config/Include/Sitecore.Commerce.Products.config file, edit the following attribute:

    <paths productRepository="/sitecore/content/Product Repository">

  2. To change the configuration of the two index files for the Solr indexing engine, update the lines in the following samples:

    Note

    If you use the Azure indexing engine, then you must modify the Sitecore.Commerce.Products.Azure.Index.Master.config and Sitecore.Commerce.Products.Azure.Index.Web.config files instead.

    • In the Sitecore.Commerce.Products.Solr.Index.Master.config file, update the Root of the ProductItemCrawler:

      RequestResponse
      <locations hint="list:AddCrawler">
       <crawler type="Sitecore.Commerce.Search.ProductItemCrawler,Sitecore.Commerce.Connect.Core">
         <Database>master</Database>
          <Root>/sitecore/content/Product Repository</Root>
       </crawler>
      </locations>
    • In the Sitecore.Commerce.Products.Solr.Index.Web.config file, update the Root of the ProductItemCrawler:

      RequestResponse
      <locations hint="list:AddCrawler">
       <crawler type="Sitecore.Commerce.Search.ProductItemCrawler,Sitecore.Commerce.Connect.Core">
         <Database>web</Database>
          <Root>/sitecore/content/Product Repository</Root>
       </crawler>
      </locations>
  3. If you change the ID of the index for the master database from the default commerce_products_master_index, you must also replace the ID in the ProductSynchronization.ProductIndexes setting in the Sitecore.Commerce.Products.Config file.

    The setting contains a list of index IDs that will be paused, resumed, and rebuilt during product synchronization:

    RequestResponse
    <!--  PRODUCT INDEXES.
            The indexes used to store synchronized products.
            Can be stopped, resumed and rebuilt automatically during product synchronization.
    -->
    <setting name="ProductSynchronization.ProductIndexes" value="sitecore_master_index, commerce_products_master_index" />

Do you have some feedback for us?

If you have suggestions for improving this article,