X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Third Party Add-Ons for X-Cart 4 (https://forum.x-cart.com/forumdisplay.php?f=45)
-   -   BCSE Backorder / Preorder with variants and rebuild (https://forum.x-cart.com/showthread.php?t=67867)

DanUK 10-02-2013 12:55 AM

BCSE Backorder / Preorder with variants and rebuild
 
Hi, anybody else use BCSE's backorder/preorder mod with variant items?

I've only just discovered this and I don't know if it is by design. If I set up variant items for backorder/preorder it populates the product_preorder table and the mod seems to work fine.

However, when I rebuild variants it loses the backorder information for the variants. I can see what is happening in that the variant rebuild is giving the variants new variantids which now don't match the variantids in the product_preorder table.

Anyone else experience this?

Thanks

Dan

vasilis 08-09-2014 04:31 AM

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.


All times are GMT -8. The time now is 11:24 AM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.