Set up a catalog for a storefront site

Current version: 10.2

You can configure multiple catalogs for a storefront. Each catalog, however, can only be used by one storefront. By default, the Catalogs item (based on the Commerce Catalog Folder template) is located under the /sitecore/Content/<tenant>/<site>/Home item and this is where you configure the catalogs associated with the site and where the catalog content is stored.

Important

How you structure your catalogs can impact performance when you access a parent item (for example, when you expand the parent node in the Content Editor or call the item.GetChildren() API). To avoid this issue, minimize the number of child items contained within any one parent item.

The Catalogs item

A site can have multiple items based on the Commerce Catalog Folder template inside or outside of the Home item. This means you can have different catalogs configured in different locations in the content tree for a site. For example, you might have a main catalog for current products actively being sold and a separate catalog for products that are no longer sold but that are still supported with manuals, specifications, and downloads.

Note

You can name and store the Catalogs item as you prefer, but it is best practice to have the item located somewhere under the Home item so that it belongs with the regular content and can be directly accessed by site visitors through the URL.

Select the catalog for the storefront site

Note

You can use a Postman script to clone an existing catalog if you want the same products shared between multiple storefronts or if you want to manually create a catalog and associate products to be shared. Both cloned and manually created catalogs can only be used with a single site.

To select the catalog for a storefront site:

  1. Navigate to the /sitecore/content/<tenant>/<site>/Home/Catalogs item.

  2. In the Selected Catalogs field, select one or more catalogs and click Save.

    The Catalogs in the Content Editor.

    Content for the selected catalogs appears under the Catalogs item.

  3. To make the catalog data available and searchable on the storefront, publish and re-index both the master and web indexes.

Select the default catalog

When you create a site using SXA storefront, the /sitecore/Content/<tenant>/<site>/Home/Catalogs and /sitecore/Content/<tenant>/<site>/Settings/Commerce/Catalog Configuration items are created. You can use the fields on these items to configure the default catalogs for the storefront site.

You can associate multiple catalogs from Commerce Engine with a storefront, but only one of them can be configured to be the default catalog used by the metadata renderings to output the canonical URL. See Shop pages and canonical URLs.

For more information on configuring a catalog, see Configure a catalog.

To select the default catalog:

  1. Navigate to the /sitecore/content/<tenant>/<site>/Settings/Commerce/Catalog Configuration item.

  2. In the Catalog field, select the default catalog to use for the storefront.

Select the categories to display on the storefront

When customers arrive on your storefront, they can use the category navigation bar and subcategory navigation lists to navigate in your catalog. You must configure what is shown in the navigation bar and subcategory lists on your storefront, which depends on the renderings you use. Each page outputs the canonical URL as part of its meta tags, which is important for search engines like Google in order to uniquely target categories and products in search results. The rendering that outputs the meta tags relies on the categories selected for display on the storefront.

Important

When you use the Category Navigation and Subcategory Navigation renderings, use the following procedure. When you use the Commerce Navigation rendering, which is the default being used in the Storefront site template, you must also define navigation settings on the rendering that point to the start location of the category navigation bar. You can also use the Page Content rendering with a rendering variant based on a Scriban template to output both the bar and the list; in this case, the configuration includes a query or path pointing to the catalog and categories in use.

To select categories for the storefront:

  1. Navigate to the /sitecore/content/<tenant>/<site>/Settings/Commerce/Catalog Configuration item.

  2. In the Start Navigation Category field, select the category that you want to display in the Category Navigation rendering on your site.

    When a user navigates your storefront, the contents of the selected folder appears in the Category Navigation and associated Subcategory Navigation renderings.

    For example, on the SXA Storefront template site, in the Start Navigation Category field, you select the Departments folder:

    The Departments folder

    On the live storefront, the category navigation bar contains the subcategories from the Departments category:

    The category navigation bar
  3. To make the category page display products in the selected category and products in all the subcategories, select the Include subcategory products check box.

    Note

    If a product is associated with multiple categories, it has a unique ID and path in each location and each instance is indexed as an individual item. This is a requirement or a feature in some scenarios. However, we recommend that you do not use this functionality to have the same products shown at both the higher and lower levels of the hierarchy.

    The Include subcategory products option addresses this scenario. We recommend that you only associate products at the lowest level and set the value to true , so that searches on the storefront do not result in multiple hits for the same product.

    If you have scenarios where products are associated with multiple categories you can select the Exclude Duplicate Search Results check box  to avoid having duplicate entries. For more information, see Configure site searches in SXA Storefront.

Do you have some feedback for us?

If you have suggestions for improving this article,