Need a small fix in admin/edit_orders.php, replace lines 267 - 274 with following:
PHP Code:
$db -> Execute($Query);
$row = $db->fields;
//UPDATE_INVENTORY_QUANTITY_START##############################################################################################################
#$order = zen_db_fetch_array($order_query);
if ($products_details["qty"] != $row->fields['products_quantity']){
$differenza_quantita = ($products_details["qty"] - $row->fields['products_quantity']);
$db -> Execute("update " . TABLE_PRODUCTS . " set products_quantity = products_quantity - " . $differenza_quantita . ", products_ordered = products_ordered + " . $differenza_quantita . " where products_id = '" . (int)$row->fields['products_id'] . "'");
}
Bookmarks