Monday, April 9, 2018

Sitecore Experience Commerce - Storefront navigation: No catalog data available

After connecting my Sitecore Experience Commerce Storefront to a custom catalog, the navigation menu no longer showed any categories and instead displayed the message:
[No catalog data available]
Sitecore Experience Commerce - no catalog data available
Product detail pages would display the following error:
No catalog data configured and available!
Sitecore Experience Commerce - No catalog data configured and available

The first steps are to ensure the catalog has been configured correctly in Sitecore. The places to check are:
  1. The catalogs item: /sitecore/Commerce/Catalog Management/Catalogs - should correctly have enabled (box checked) the catalog you want available in Sitecore and cached.
  2. Storefront catalog configuration item: /sitecore/Commerce/Commerce Control Panel/Storefront Settings/Storefronts/MyStorefront/Catalog Configuration - This should have the correct catalog configured and in particular Start Navigation Category should also be pointing to a category (such as Departments in the Habitat example).
  3. Site home item: /sitecore/content/Sitecore/NW/Home - should point to the correct Storefront configuration on the Control Panel Configuration field.
  4. Product catalog item for the site: /sitecore/content/Sitecore/MySite/Home/Product Catalog - should correctly point to the same source as Start Navigation Category in point 2.

Once all of these settings appear correct, perform a full publish to ensure all data is present in the web database. In my case by rebuilding the web and master indexes (Sitecore and not commerce), the navigation begun to work as expected. I was able to debug this by checking if my Start Navigation Category item was present in the SOLR index.

This can be achieved by querying the SOLR index with the following query:
Where you replace the GUID with that of the item of your starting navigation category. To check if any categories are actually indexed at all, the following query will suffice:
If these queries return no data in the web or master Sitecore indexes, the indexer may not correctly be configured to the right commerce environment.

No comments:

Post a Comment