
Originally Posted by
mc12345678
This to me revises my previous statement. There does appear to be an error in the coding/handling of checkboxes at least on the inventory side. Cost wise, it comes out correctly, I was "charged" the amount expected for each of the above situations, but my stock would have been grossly in error if it was a real product.
Ajeh has spent several days in the past couple weeks investigating this. Today we were able to determine that the problem is a chicken/egg cache issue.
There are a couple ways to fix it, but the simplest way to fix your 1.5.1 code is to add . "\n#" . $i to these 2 queries in /includes/classes/order.php:
Code:
$stock_values = $db->Execute($stock_query_raw . "\n#" . $i);
} else {
$stock_values = $db->Execute("select * from " . TABLE_PRODUCTS . " where products_id = '" . zen_get_prid($this->products[$i]['id']) . "'". "\n#" . $i);
}
We'll fix it a little differently in 152/160 going forward by passing a proper cache bypass. But the above approach creates enough uniqueness will trigger an appropriate implied bypass, with minimal need to touch your own core files.