If the customer is in a certain customer group category, what is the most efficient way to prevent stock decrease once the order is placed?

I want the quantity to remain unchanged only for some customers after they place an order.

1 Answer 1


You can add an observer for sales_order_save_after and try this:


public function salesOrderSaveAfter(Varien_Event_Observer $observer)
    $order   = $observer->getEvent()->getOrder();
    $groupId = $order->getQuote()->getCustomerGroupId();
    # adjust group ID
    if ($groupId == '1') {
        $items = $order->getItemsCollection();
        foreach ($items as $item) {
            $product   = $item->getProduct();
            $stockItem = $product->getStockItem();
  • Very nice workaround. Will try to create observer.php in local directory and test it out.
    – Icon
    Jul 18, 2017 at 3:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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