Developer forum

Forum » Development » Product.Clone - No variations?

Product.Clone - No variations?

Jonas Mersholm
Reply

Is it a bug that the "Product.Clone()" method does not clone product variations?

 

Best regards,

Jonas Mersholm


Replies

 
Jeppe Eriksson Agger Dynamicweb Employee
Jeppe Eriksson Agger
Reply

Hi Jonas,

I'm not sure what you mean when you say it does not clone the product variations. Product.Clone is invoked on an instance of a product and clones the entire memory space for that object into another memory space, thereby creating a new instance of the product that is exactly the same.

If you need to clone multiple product instances, you need to invoke Clone on each of them.

- Jeppe

 
Jonas Mersholm
Reply

Hi Jeppe,

I see. Well, by variations i mean the actual variations ( Variation relations, combinations ETC ).

What i figured out is that the variation groups, relations and combinations are not cloned with it, applying the new productID to the groups,combinations etc. 

Hope it makes sense. Thanks for replying.

 

Jonas

 

 

You must be logged in to post in the forum