Developer forum

Forum » Ecommerce - Standard features » Applying changes to variants and main products

Applying changes to variants and main products

Imar Spaanjaars Dynamicweb Employee
Imar Spaanjaars
Reply

Hi there,

When I don't allow a variant field (like the name) to be updateable by uncecking its checkbox in the Fields section, Dynamicweb allows you to edit that field for the main product only and not for the variant. That's great and exactly how it should be.

If, however, the variant gets changed in the database (for example, through integration we update the name) and you then subsequently edit that variant, its settings are applied to all variants and the main product instead of the data from the main product being forced down on the variants.

To see what I mean, consider these product names (setup through the UI)

My Product (main product) 
  My Product (variant 1)
  My Product (variant 2)
  My Product (variant 3)
 

I then change variant 2 in the database as follows:

My Product (main product) 
  My Product (variant 1)
  My New Product Name (variant 2)
  My Product (variant 3)
 

Then, when I open variant 2 and make a change to a different field (for example, set its Active state) and save the changes, all products take the new name:

My New Product Name (main product) 
  My New Product Name (variant 1)
  My New Product Name (variant 2)
  My New Product Name (variant 3)

Does that make sense and is this the right behavior? You would imagine that because the variant name can't be different across variants, the product and variants would take on the main product's name, like this:

My Product (main product) 
  My Product (variant 1)
  My Product (variant 2)
  My Product (variant 3)
 

Or not? Is there a good reason that DW takes the edited variant instead?

Cheers,

Imar


Replies

 
Nicolai Pedersen
Reply
This post has been marked as an answer

That makes perfect sense and exactly as designed. When you set that checkbox the entire idea is that the value is the same for all instances - and that is how data is saved.

You import data that is different - so you configuration should reflect that. You can then make the field readonly if you do not want it to be editable.

BR Nicolai

Votes for this answer: 1
 
Imar Spaanjaars Dynamicweb Employee
Imar Spaanjaars
Reply

So it copies the data from the variant or main product you're editing to the ones you're not editing, regardless of what you're editing is the main product or a variant.

Thanks,

Imar

 
Nicolai Pedersen
Reply

Yes.

 

You must be logged in to post in the forum