gpt4 book ai didi

opencart - 订单成功后 "subtract stock"出现在哪个.php文件中?

转载 作者:行者123 更新时间:2023-12-05 05:05:03 24 4
gpt4 key购买 nike

我正在使用 Opencart v.2.1.0.2 并且我正在尝试找到 .php 文件,其中在成功订购后发生“减去库存”。

有人可以帮忙吗?

谢谢!

最佳答案

可以在\catalog\model\checkout\order.php中查找

产品数量更新

$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'");

产品选项数量更新

$this->db->query("UPDATE " . DB_PREFIX . "product_option_value SET quantity = (quantity - " . (int)$order_product['quantity'] . ") WHERE product_option_value_id = '" . (int)$option['product_option_value_id'] . "' AND subtract = '1'");

虽然有补货查询,但如果订单被取消。

关于opencart - 订单成功后 "subtract stock"出现在哪个.php文件中?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60726126/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com