Developer forum

Forum » Ecommerce - Standard features » Variant relations in Ecom Assortments

Variant relations in Ecom Assortments

Barend Mosch
Reply

Hi there!

I've encountered a slight confusion about the way product-assortment relations are made in the database.

As far as I know a product can be part of one or more assortments, declared by a new record in the EcomAssortmentProductRelations with the productId and its variantId (empty for master products).

My question being, why is the variant ID here?

What is the idea behind assigning specific variants to assortments? Isn't assigning the master product to a different assortment the same?
In the current example product 121109 resides in assortment 'CoreCore' while one of its variants is assigned to assortment 'MatthewCore'.


In DW the product and all its variants are visible in both assortments.



The solution in question has products with over 1000 variants. Currently the master product and all variants have a record in the Assortment product relation table with exactly the same assortmentIDs. Is it necessary to create variant relations as wel?

Multiple questions here, hopefully this illustrates my confusion. Thanks in advance,

Barend Mosch


Replies

 
Nicolai Pedersen Dynamicweb Employee
Nicolai Pedersen
Reply

We have customers that use variants in assortments. Or family products - you can buy A, but not B in a family. I do not know why that is needed, but apparantly it is...

If you want a master and all its variants to be in an assortment, just include the master in the relation.

 

 
Barend Mosch
Reply

Hi Nicolai,

Thanks for the quick response!

So its safe to assume that if all variants share the same assortment as the master, there is no need to create the variant relations. 1 master product-assortment relation is enough.

What if 1 variant in the family group differs? Should there be no master product - assortment relation?

Say the following test case:

Family product with 2 variants, no master product - assortment relation since that would add all variants to the assortment. But 2 different assortments 1 for each variant.

Im seeing the following in the Assortment interface in the Ecom: (same for MatthewsCore)

 

You must be logged in to post in the forum