3

Currently, stock gets reduced when the Order has been placed, is there any way to change on invoice?

As there, lot of junk orders, is there any way to make stock reducing when invoice for the corresponding stock has been made.

2

Stock reduction is done in Mage_CatalogInventory_Model_Observer . So to do it first we will have to stop quantity decrement. To do this go to method public function subtractQuoteInventory(Varien_Event_Observer $observer){} in your rewritten observer and add below code

$items = $this->_getProductsQty($quote->getAllItems());
Mage::getSingleton('cataloginventory/stock')->revertProductsSale($items);

Now you will have to hook event sales_order_save_after and in that observer you may reduce the stock
When does Magento decrement quantity This will help you in case you want to understand the decrement process

0
2

By default Magento provides this configuration for decrease stock from store > config > Catalog > Inventory > Stock Options (Magento 2) , for Magento 1 system > config > Catalog > Inventory > Stock Options

Decrease Stock When Order is Placed. You can set this option to No If you do not want to decrease the stock on order place.

enter image description here

And to decrease the stock on Invoice you can use event sales_order_invoice_save_after.

4
  • thanks, there is sequence of other steps which needs to be handled in code to achieve it. It will be good if magento team does as configuration. – arvindwill Sep 28 '17 at 9:24
  • 1
    yes, there are number of steps to achieve your complete requirement, butI thought this may give some light :) @arvindwill – Keyur Shah Sep 28 '17 at 9:26
  • yes it gave the direction and achieved , thanks. – arvindwill Sep 28 '17 at 11:36
  • Accept the answer If you find it helpful @arvindwill – Keyur Shah Sep 30 '17 at 14:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.