Using the following code, you can remove an item from the Magento cart by item id:
1 2 3 |
$cartHelper = Mage::helper('checkout/cart'); $cartItemId = 123; $cartHelper->getCart()->removeItem($cartItemId)->save(); |
Removing items from cart programmatically
You want or need help implementing this solution? Maybe you did not find what you were looking for? Contact me and I will assist you with whatever Magento problem troubles you!