0

Currently the only way to remove a product on the cart page is if you enter 0 in the quantity field and click update shopping cart. Is there any settings I can enable or extension I can use to add a remove button on each line item?

I have found http://pradeepsanku.wordpress.com/tag/delete-product-from-cart-in-magento-programmatically/ which I could use to build my own extension but wanted to see what was available first before wasting my time

0

This is a default functionality of magento, more than likely it was removed from your custom theme. To add it back go to

/app/design/frontend/default/default/template/checkout/cart/item/default.phtml

Add

<a href="<?php echo $this->getDeleteUrl() ?>" title="<?php echo $this->__('Remove Item') ?>" class="btn-remove btn-remove2"><?php echo $this->__('Remove Item') ?></a>

Also see How to get url to remove product from cart in Magento?.

  • 1
    Or it could also have been hidden via CSS. You can check by going to the My Cart page and viewing the source then searching for 'btn-remove'. – Jason Tipton Sep 25 '14 at 15:56
0

Magento has this functionality out of the box, you will probably find it has been removed from your particular theme template.

enter image description here

0

In "cart.phtml" after

<form action="<?php echo $this->getUrl('checkout/cart/updatePost') ?>" method="post">

Insert:

<?php echo $this->getBlockHtml('formkey'); ?>

And insert button in form tag:

<button type="submit" name="update_cart_action" value="empty_cart" title="<?php echo $this->__('Clear Shopping Cart'); ?>" class="button btn-update" id="empty_cart_button"><?php echo $this->__('Clear Shopping Cart'); ?></button>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.