I have a condition that I have to change/decrease the stock only when the order status changes to processing. By default it is changed as soon as order is placed. But, this is what I need to achieve.
Magento – Decrease stock when order status changes to processing
magento-1.9sales-order
Best Answer
First,read the question When does Magento decrement quantity
Let do some tricky code this requirement.
First,in order to stop decrement rewrite the Observer class
Mage_CatalogInventory_Model_Observer
.At this class add this code for revert the stock which just decrease.
Then using
sales_order_save_after
with checking order status process you can deducted the stock