Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

OpenCart 2.x system Commodity quantity inventory reduction Logic

2025-03-11 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Network Security >

Share

Shulou(Shulou.com)06/01 Report--

In OpenCart versions 1.5.x and 2.x, the subtract option is set when editing items in the background, and if selected, the inventory quantity is reduced when processed in subsequent orders.

The mechanism for inventory reduction varies from version to version of opencart.

In the OpenCart 2.x series version, the reduction in inventory is handled through the model file in the following path.

Catalog/model/checkout/order.php

/ / If current order status is not processing or complete but new status is processing or complete then commence completing the order

/ / if the current order status is not [in processing] or [completed] status, but the status to be changed to [processing] or [completed] status, reduce inventory

The trigger event for this action is that the website backend changes the order status to [Processing (processing)] or [Complete (completed)].

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Network Security

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report