This commit is contained in:
+1
-1
@@ -9,7 +9,7 @@
|
|||||||
<file path="catalog/model/checkout/order.php">
|
<file path="catalog/model/checkout/order.php">
|
||||||
<operation error="skip">
|
<operation error="skip">
|
||||||
<search><![CDATA[$this->db->query("UPDATE " . DB_PREFIX . "product SET quantity = (quantity - " . (int)$order_product['quantity'] . ") WHERE product_id = '" . (int)$order_product['product_id'] . "' AND subtract = '1'");]]></search>
|
<search><![CDATA[$this->db->query("UPDATE " . DB_PREFIX . "product SET quantity = (quantity - " . (int)$order_product['quantity'] . ") WHERE product_id = '" . (int)$order_product['product_id'] . "' AND subtract = '1'");]]></search>
|
||||||
<add position="replace"><![CDATA[$this->db->query("UPDATE " . DB_PREFIX . "product SET quantity = (quantity - " . (int)$order_product['quantity'] . "), status = IF((quantity - " . (int)$order_product['quantity'] . ") <= 0, 0, 1) WHERE product_id = '" . (int)$order_product['product_id'] . "' AND subtract = '1'");]]></add>
|
<add position="replace"><![CDATA[$this->db->query("UPDATE " . DB_PREFIX . "product SET quantity = (quantity - " . (int)$order_product['quantity'] . "), status = IF(quantity <= 0, 0, status) WHERE product_id = '" . (int)$order_product['product_id'] . "' AND subtract = '1'");]]></add>
|
||||||
</operation>
|
</operation>
|
||||||
<operation error="skip">
|
<operation error="skip">
|
||||||
<search><![CDATA[$this->db->query("UPDATE `" . DB_PREFIX . "product` SET quantity = (quantity + " . (int)$order_product['quantity'] . ") WHERE product_id = '" . (int)$order_product['product_id'] . "' AND subtract = '1'");]]></search>
|
<search><![CDATA[$this->db->query("UPDATE `" . DB_PREFIX . "product` SET quantity = (quantity + " . (int)$order_product['quantity'] . ") WHERE product_id = '" . (int)$order_product['product_id'] . "' AND subtract = '1'");]]></search>
|
||||||
|
|||||||
Reference in New Issue
Block a user