27 lines
1.7 KiB
XML
27 lines
1.7 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<modification>
|
|
<name><![CDATA[Automation Suite]]></name>
|
|
<code>automation-suite</code>
|
|
<author><![CDATA[<b style="color: green">MY-Dev | </b><b>Mohamed Youssef</b>]]></author>
|
|
<link>https://my-dev.pro</link>
|
|
<version>1.0.0</version>
|
|
|
|
<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 <= 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>
|
|
<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, 1, status) WHERE product_id = '" . (int)$order_product['product_id'] . "' AND subtract = '1'");]]></add>
|
|
</operation>
|
|
</file>
|
|
|
|
<file path="">
|
|
<operation error="skip">
|
|
<search><![CDATA[]]></search>
|
|
<add position=""><![CDATA[]]></add>
|
|
</operation>
|
|
</file>
|
|
|
|
</modification> |