Developer forum

Forum » PIM » Show only Attributes of Related Products on Accessory Page and Storing the data in PIM

Show only Attributes of Related Products on Accessory Page and Storing the data in PIM

Than Lwin Chit
Reply

 


Hi everyone,

I’m working on a setup in Dynamicweb 10 PIM where products are connected in a many-to-many relationship — for example, cameras and compatible lenses.

My scenario:

  • I have multiple cameras (X100, X200, X300) and multiple lenses (L100, L200, L300).

  • Cameras and lenses have a many-to-many relationship:

    • Lens L100 → compatible with Camera X100 + X200

    • Lens L200 → compatible with Camera X200 + X300

My challenge:

  • When viewing a lens product page (L100), I want to display all compatible cameras AND their attributes (e.g. sensor size, resolution).

Questions:

  1. Data Structure in PIM:

    • Should I store each camera as a standalone product in PIM (with its own attributes like resolution, sensor size, etc.) and then create a bidirectional product relation to lenses?

    • Or is there a better pattern for storing “main product” data that I can later display from a related product page?

  2. Frontend Template:

    • Can I access the attributes of related products using the standard Ecom:Product.Relations loop?

    • Any example Razor snippet or best practice to render related product attributes cleanly on the accessory page?

I want to keep the setup scalable because there will be millions of cameras and millions of lenses, with many cross-relations.

Thanks in advance for your advice and examples!

 


Replies

 

You must be logged in to post in the forum