Developer forum

Forum » Ecommerce - Standard features » Primary Product Page - Multishops scenario

Primary Product Page - Multishops scenario

Marie Louise Veigert
Reply

Hi,

We have a multishop site where products lives in multiple shops across websites.

They need to have a detailpage assigned to the group on each website shop.
But as I can see in the documentation the products need a primary group for it to work.


So my scenario is the following:

Product A lives in these shops and groups:

Shop 1 > group X

Shop 1  > group Y
 

Shop 2 > group Z

Shop 2 > group Q

 

Shop 1 have detailpage Xx linked in group X (Shop 1)

Shop 2 have detailpage Zz linked in group Z (Shop 2)

 

But Product A cannot have both X and Z as primary group. How to solve this scenario?

BR Marie Louise

 


Replies

 
Nicolai Pedersen Dynamicweb Employee
Nicolai Pedersen
Reply

It depends on how you make the link.

You can use these extensions:

https://doc.dynamicweb.dev/api/Dynamicweb.Ecommerce.ProductCatalog.ProductViewModelExtensions.html#Dynamicweb_Ecommerce_ProductCatalog_ProductViewModelExtensions_GetProductLink_Dynamicweb_Ecommerce_ProductCatalog_ProductViewModel_System_Int32_System_Boolean_

Check the remarks on this docs how it works if a product is in different groups. Basically we find the one in the current shop context and use primary pageid from that.

 

You must be logged in to post in the forum