Showing similar products using shelf.relatedProducts

I have added products under similars and accessories fields for one product and i used shelf.relatedProducts block to show these products in PDP. But those are not showing any guess why its not showing?

Hey @Narendra! While the shelf.relatedProducts block is now deprecated, it should still be working for similars and accessories. Either way, I would recommend checking out the Building a Shelf guide to get the latest guidance on how to best display the products you need in different theme pages.

Besides that, here are some things I would check:

  • Are the related products active in the Catalog?
  • Do the related products have stock available in the Inventory?
  • Did you add the required props, particularly for summary and productList?

If you can, please share a code snippet with your shelf definitions for us be able to debug further.