OpenCart 2.x system product quantity inventory reduction logic, opencart inventory reduction
OpenCart 1.5.x and 2. in Version x, When you edit a product in the background, you can set whether to reduce the inventory (subtract) option. If you select this option, the inventory quantity will be reduced during subsequent order processing.
The mechanism for reducing inventory quantity varies with opencart versions.
In OpenCart 2. x series, the inventory quantity reduction 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 is not in the "processing" or "completed" status but must be changed to the "processing" or "completed" status, the inventory is reduced.
This operation is triggered when the website background changes the order status to Processing or Complete )].