View Single Post
  #2  
Old 08-09-2014, 04:31 AM
  vasilis's Avatar 
vasilis vasilis is offline
 

X-Adept
  
Join Date: Feb 2009
Posts: 758
 

Default Re: BCSE Backorder / Preorder with variants and rebuild

Yes, I noticed that too in Gold v. 4.4.5.

it seems that the variants rebuild function func_rebuild_variants() also changes the 'variantid' value of variants under certain circumstances. For example, when importing a part of variants of a product, the rest of the variants are rebuilt, and their variantid values are changed.

For example, in a product with 3 variants, if I import new prices for the two of them (2 rows in the csv import file), variants rebuild will take place and the variantid value of the 3rd variant that was not imported, will be changed.

This means that any references of the variants whose 'variantid' values change, are broken in other tables, in the case that code is not provided for updating the 'variantid' values of those variants in those tables.

But I wonder why on earth should the 'variantid' values change in the variants rebuild functionality, since these compose part of primary key field for other tables.
Reply With Quote