URL: www.fofill.se
Hi,
I’m trying to add a “cart remove button” on my site. I thought maybe it was a simple option I could change on the customize template panel. But it looks like something you have to add yourself in the liquid code…
Hoping someone could help me with this. Need it fixed today
I found this line of code on the internet:
{{ 'cart.general.remove' | t }}
I have tried to add it to our cart.item. liquid and cart.liquid, but it doesn’t work. It shows up, but the button redirects to an error page.
I would really appreciate some help!
Thank you!
Best regards, Robin
Hello @RobinOlofsson ,
Here is the code that fix your issue.
1 Like
Hi!
Thanks for the code. Do I put it in the cart.liquid (template) or cart.item.liquid (snippets)? And “reder icon-remove”, should that not link to an icon?
Thank you!
Hi
You have to add this code in snippets file.
{% render ‘icon-remove’ %} : This line is just rendering icon, you can put your own icon code here instead of it.
I added the code and the snippet. Somehow, it doesn’t remove the products in the cart. It just updates the page with the same quantity and no changes. Would you be able to take a look at it? Or do you know why this problem occurs?
Thank you!