Is it possible to create “Remove from cart” Url for a product with a custom function, so that i can place that function in my custom block which allows user to remove an item from cart…
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If you examine, app/code/core/Mage/Checkout/Block/Cart/Item/Renderer.php and find the method: getDeleteUrl() will offer some insight on how its generated:
You can find the call to this in template/checkout/cart/item/default.phtml:
<td class="a-center"><a href="<?php echo $this->getDeleteUrl()?>" title="<?php echo $this->__('Remove item')?>" class="btn-remove btn-remove2"><?php echo $this->__('Remove item')?></a></td>With this info you should be able to create a new controller action for the cart to simply remove a specific ID to a product in the cart’s index.
Hope this helps.