Cart

Solved
ANAND11
Excursionist
14 1 1

Hi, 

I'm having an issue with removing a product from the cart.

If the wrong item is added to the cart there is no delete option, also if I use the minus button on the quantity it stays on 1 and does not remove the item from my cart.

I'm using Brooklyn Theme.

0 Likes
ankur-verma
Shopify Expert
94 19 26

This is an accepted solution.

Hi Anand

Generally in Brooklyn theme if you click on '-' button it removed the item from cart. But if in your case it is not working. Then you can add a remove button for that item. You can do it by editing the liquid file.
You can find the cart.liquid file in you theme. There you can find out the the code similar to this.

{% for line in cart.items %}

{% endfor %}

 so add a remove link in side this loop.

<a href="/cart/change?line={{ forloop.index }}&quantity=0">Remove</a>


And it will work as you except.
Please let me know if it worked.

ANAND11
Excursionist
14 1 1

Hi,

It worked, but I would like to have " Remove" displayed as a button. Is this possible?

0 Likes
ankur-verma
Shopify Expert
94 19 26

This is an accepted solution.

Hi Anand

It is possible. I's quite simple.
Just replace the <a> anchor tag with this <button> tag.

So you have to remove this.

 

<a href="/cart/change?line={{ forloop.index }}&quantity=0">Remove</a>

 

And put this code there.

 <button onclick="window.location.href = '/cart/change?line={{ forloop.index }}&quantity=0';">Remove</button>


Please let me know it works.

 

0 Likes
ANAND11
Excursionist
14 1 1

Hi,

It did not work as I hoped. There are 3 remove links, 

1 Under Product Title

2 Above Product Image

 

I dont see a button, Its just text. Remove Button.png

0 Likes
ankur-verma
Shopify Expert
94 19 26

Hi..
Then may be there is some styling issue.
If you can send me the link of your store. Than I can look in to it.

ukmobilestore
Tourist
7 0 1

cart not loading see attached please help 


@ankur-verma wrote:

Hi..
Then may be there is some styling issue.
If you can send me the link of your store. Than I can look in to it.



cart not working.png

0 Likes
mreza1988
Tourist
8 0 0

Hi,

 

Can you help me add the Remove button also please.

 

 

Thank you.

0 Likes
mysweetshop
New Member
3 0 0

I am having that same problem. can you help. I do not have anything in the coding tab

 

0 Likes