<?php
Mage::getSingleton('checkout/session')->clear();
foreach( Mage::getSingleton('checkout/session')->getQuote()->getItemsCollection() as $item ){
Mage::getSingleton('checkout/cart')->removeItem( $item->getId() )->save();
}
?>
OR
<?php echo $this->getUrl('checkout/cart/delete', array('id' => 'item_id')); ?>
Mage::getSingleton('checkout/session')->clear();
foreach( Mage::getSingleton('checkout/session')->getQuote()->getItemsCollection() as $item ){
Mage::getSingleton('checkout/cart')->removeItem( $item->getId() )->save();
}
?>
OR
<?php echo $this->getUrl('checkout/cart/delete', array('id' => 'item_id')); ?>
No comments:
Post a Comment