OpenCart 2.x system product quantity inventory reduction logic, opencart inventory reduction

Source: Internet
Author: User
Tags opencart

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 )].

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.