Ahmadoooo Posted April 1, 2017 Share Posted April 1, 2017 Hi, I added a global cart to my website in which it appears on all pages. However, whenever I remove an item it redirects me to shopping cart page. This is the code I use to remove an item: <a class="remove-from-cart xsmall" rel="nofollow" href="{$product.remove_from_cart_url}" data-link-action="remove-from-cart"> 1- How can I remove the item without redirection? 2- How can I make the container dir only refreshes? Find attached photo for clarification. Thanks Ahmad Link to comment Share on other sites More sharing options...
NemoPS Posted April 2, 2017 Share Posted April 2, 2017 Prestashop version? Link to comment Share on other sites More sharing options...
Ahmadoooo Posted April 2, 2017 Author Share Posted April 2, 2017 1.7.0.6 with starter theme Thanks Link to comment Share on other sites More sharing options...
Ahmadoooo Posted April 2, 2017 Author Share Posted April 2, 2017 Anyone? Link to comment Share on other sites More sharing options...
Aurelink_ Posted February 23, 2018 Share Posted February 23, 2018 I'm interresting too, if I found a solution I'll let you know Link to comment Share on other sites More sharing options...
Aurelink_ Posted February 23, 2018 Share Posted February 23, 2018 (edited) So i come with a solution, first you must open the file : theme/your_theme/modules/ps_shoppingcart-product-line.tpl or ps_shoppingcart.tpl depends on the one which is used to display the product cart, Then just replace your <a class="remove-from-cart"> by this one : <a class = "remove-from-cart" rel = "nofollow" href = "{$product.remove_from_cart_url}" data-link-action = "delete-from-cart" data-id-product = "{$product.id_product|escape:'javascript'}" data-id-product-attribute = "{$product.id_product_attribute|escape:'javascript'}" data-id-customization = "{$product.id_customization|escape:'javascript'}"> {if !isset($product.is_gift) || !$product.is_gift} <i class="fa fa-times-circle"></i> {/if} </a> If something goes wrong just say what is it, i'll try to help you Edited February 23, 2018 by Aurelink_ (see edit history) 1 Link to comment Share on other sites More sharing options...
Solutions Posted September 19, 2018 Share Posted September 19, 2018 Aurelink_ solution is not working for me. Is there any other solution to remove products from minicart and stay in the same page? Thanks. Link to comment Share on other sites More sharing options...
Borisvit Posted May 30, 2020 Share Posted May 30, 2020 Try this solution: <a rel="nofollow" href="{$products.remove_from_cart_url}" data-link-action="delete-from-cart"> it helped me. $product.remove_from_cart_url - removes only one item. $products.remove_from_cart_url - removes multiple items, in series. In my case, after removing the item: delete-from-cart - refreshes the page, remove-from-cart - redirects to the cart page. 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now