debug disable product
Build OpenCart Extension / build-release (push) Successful in 4m28s

This commit is contained in:
Mohamed Youssef
2026-04-16 15:14:51 +02:00
parent 6e14d2a3c7
commit 4610d9c640
+1 -1
View File
@@ -9,7 +9,7 @@
<file path="catalog/model/checkout/order.php">
<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>
<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 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>