I am using this event: sales_quote_save_after This is my function code:

public function myFunction(Varien_Event_Observer $o){
    $quote = $o->getEvent()->getQuote();

I have simple products and bundle products. I would like to remove only simple products. How can I do that?


  • 1
    This will require you removing items from the quote, then re-saving the quote which will trigger a sales_quote_save_after event again. This is dangerous grounds for an infinite loop unless you're careful. Your best bet is to remove the items before saving the quote. Commented Mar 3, 2017 at 9:15

1 Answer 1


Try below code :

 $quote = $o->getEvent()->getQuote();
    foreach($quoteItems as $oneItem){
        $product = Mage::getModel('catalog/product')->load($oneItem->getProductId());
        $productType=$product ->getTypeId();

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.