I would need to stop decreasing inventory while placing an order, I need to do this activity only after successful payment.
Yes, We can disable this qty decrease pragmatically
How ?
Extend Mage_Checkout_Model_Type_Onepage and Rewrite the method saveOrder
Changes
before the following lines in the above method, will be around #740 to #742
$service = Mage::getModel('sales/service_quote', $this->getQuote());
$service->submitAll();
Add
$quote = $this->getQuote();
# Ref: Mage_CatalogInventory_Model_Observer::subtractQuoteInventory
$quote->setInventoryProcessed(true);
This will inform Magento that dont process inventory for the quote, so it wont decrease the qty even if it is configured to do so.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With