My guess (yet to be able to prove) is that the query of line 317 of includes/classes/observers/class.products_with_attributes_stock.php needs to be formatted like that of includes/classes/order.php line 734 (zc 1.5.3/1.5.4) such that the select query is "refreshed" for each occurrence, which isn't an issue when the attrbutes (sans text) are different...
So I would think that:
Code:
$attribute_stock_available = $db->Execute($get_quantity_query);
Should be:
Code:
$attribute_stock_available = $db->Execute($get_quantity_query, false, false, 0, true));
Inside of includes/classes/observers/class.products_with_attributes_stock.php line 317...
Reason behind this thought? Well, the sock quantity only reduced by the "last" product of the same product_id... This meant that the previous select/update combo was run a second time using the same initial data of the original available stock.... Thus, after the first product was removed from stock, when the query was asked again without clearing the cache, the result was the same on the second and final product (same products_id and sba table stock_id, but different text). Will test as soon as I get back to a computer where I can modify the code.
Sorry badarac. :)
Bookmarks