ColorlibHQ / Fashe

Free Shopify ecommerce theme
34 stars 50 forks source link

Remove button not working on cart page #29

Open nodarik opened 5 years ago

nodarik commented 5 years ago

add one item in the cart, then go to the cart page and try to remove item, check this image:

https://colorlib.com/wp/wp-content/uploads/sites/2/screenshot-remove-button-not-working.png

sicdigital commented 5 years ago

@nodarik If you refresh the page was the item removed? I had to add some code for this to refresh after hitting the remove button.

cristianraiber commented 5 years ago

@sicdigital - create a PR with your changes, please? :)

sicdigital commented 5 years ago

Yeah, I can make a PR, I also made my version be able to go down to quantity 0, do you want me to include that. Currently you can only update the quantity of items in the cart to anything above 1.

cristianraiber commented 5 years ago

@sicdigital - include everything you've done and I'll get one of the developers to review your PR and merge accordingly :)

lexvz commented 5 years ago

Has this issue been solved? A client of mine has the same issue (:

mtsalim commented 4 years ago

Hello, dont know if anyone will need this in the future, but: in cart.liquid ~line:78, remove {{ ‘cart.general.remove’ | t }} and replace with < a href="/cart/change?line=1&quantity=0"> Remover < /a >, dont forget to remove the spaces after < and before >.

essarouri commented 4 years ago

@mtsalim yes it's work thank you

Smj90 commented 4 years ago

Hello, dont know if anyone will need this in the future, but: in cart.liquid ~line:78, remove {{ ‘cart.general.remove’ | t }} and replace with < a href="/cart/change?line=1&quantity=0"> Remover < /a >, dont forget to remove the spaces after < and before >.

It Worked!!!! :)

martentaavet commented 1 year ago

Hello, dont know if anyone will need this in the future, but: in cart.liquid ~line:78, remove {{ ‘cart.general.remove’ | t }} and replace with < a href="/cart/change?line=1&quantity=0"> Remover < /a >, dont forget to remove the spaces after < and before >.

the code provided before seems to delete the first product in the cart.

If anybody needs it i wrote this snippet you should replace this snippet of the code:

< button class="remove s-text7 flex-c-m m-l-30 m-t-10 p-l-10 p-r-10 p-t-5 p-b-5 bo1 bo-rad-23 hov1 trans-0-4" data-key="{{ item.variant_id }}" > {{ 'cart.general.remove' | t }} < /button >

with this snippet:

< form action="/cart/change" method="post" id="cartform{{ item.id }}" > < input type="hidden" name="line" value="{{ forloop.index }}" > < input type="hidden" name="quantity" value="0 "> < button type="submit" class="remove s-text7 flex-c-m m-l-30 m-t-10 p-l-10 p-r-10 p-t-5 p-b-5 bo1 bo-rad-23 hov1 trans-0-4" > Remove < /button > < /form >

also as said before then dont forget to remove the spaces after < and before >.