Magento: Clear / Delete Shopping Cart Items of Single or All Customers
Here is the code to delete all shopping cart items of currently logged in single customer:- $cart = Mage::getSingleton(‘checkout/cart’); $quoteItems = Mage::getSingleton(‘checkout/session’) ->getQuote() ->getItemsCollection(); foreach( $quoteItems as $item ){ $cart->removeItem( $item->getId() ); } $cart->save();...