Showing similar products using shelf.relatedProducts

Hi,
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?
Thanks

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.

1 Like

I hope this message finds you well. I came across your post regarding the deprecated shelf.relatedProducts block, and I am currently exploring alternatives for displaying related products using list-context.product-list.

I have reviewed the Building a Shelf guide as suggested, but I am still seeking more clarity on how to effectively implement list-context.product-list for showcasing related products. I would appreciate it if you could share any insights or code snippets that demonstrate the correct usage of this block for related products.

Additionally, I’ve checked the following:

  1. Ensured that related products are active in the Catalog.
  2. Verified the availability of stock for the related products in the Inventory.
  3. Confirmed the inclusion of required props, especially for summary and productList.

If possible, could you share a code snippet illustrating how you have defined your shelf using list-context.product-list? This would greatly assist me in debugging and understanding the implementation better.

Thank you in advance for your assistance!

1 Like

Anteriormente habia hecho funcionar Shelf.relatedproducts pero hoy queriendo replicar de nuevo en otro sitio no aparece nada, revisando ProductSummaryList no veo la forma de meter ahi los productos sugeridos ni similares que es para lo que usaba shelf.relatedproducts , alguna sugerencia

1 Like