Magento Clear Checkout Session Programitically

 

Magento Clear Checkout Session Programitically, Follow below code for the same.

foreach( Mage::getSingleton(‘checkout/session’)->getQuote()->getItemsCollection() as $item ){
Mage::getSingleton(‘checkout/cart’)->removeItem( $item->getId() )->save();
}

Mage::getSingleton(‘checkout/session’)->clear();

Leave a Reply

Your email address will not be published. Required fields are marked *