Magento 2 supports minimum purchase quantities. This setting defines the minimum number of units that must be added to the cart. If you want the Add to Cart button on a Magento 2 category page (list.phtml) to ignore that minimum…
Cart items are disappearing from cart (Magento 1)
Sometimes, when refreshing the Magento cart page for example, the cart items will disappear. The problem here might be a missing image. Check if there are any missing images on the cart page and if so, upload them to your…
Cart items disappear from the shopping cart (Magento 1)
Sometimes products disappear from the shopping cart, for example after refreshing the cart page. One possible reason is a missing image on the Magento cart page. Check that all images are available and upload any missing files to the server.
Removing estimated shipping from cart (Magento 1)
To remove the estimated shipping block from the Magento cart, you have to add the below code, or, if the checkout_cart_index handle already exists, simply add the checkout.cart section to it.
|
1 2 3 4 5 6 7 |
<checkout_cart_index> <reference name="content"> <block name="checkout.cart"> <remove name="checkout.cart.shipping"/> </block> </reference> </checkout_cart_index> |
Removing items from cart programmatically (Magento 1)
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(); |
Getting the product for cart item (Magento 1)
Use the following code to get the matching product of a Magento cart item:
|
1 |
$product = $item->getProduct(); |