Remove Update Cart Button

Nandan_Barman
Shopify Partner
10 0 1

 

hello, I am creating a new shopify store where i dont want to use to "update cart" button in cart page.the cart will be updated automatically when we will change the quantity of product.. can you help me to make this theme?
my store is lumishoes-co-2.myshopify.com

0 Likes
Nandan_Barman
Shopify Partner
10 0 1

help me

ICBits
Shopify Partner
3 0 5

While this is really late in the game and I'm sure you found the answer by now, I'm adding this for others who might be looking for the same answer as I searched and searched and found little for those who might be wanting the same functionality for the Minimal theme.  Bascially, I made two changes that I really like:

First, to get the quatity to auto-update without having to click the Update Cart button, I needed to add code to the actual Quantity field.  This is done in the cart-template.liquid file in Sections. The original code read:

<input type="number" class="cart__quantity-selector" name="updates[]" id="updates_{{ item.key }}" value="{{ item.quantity }}" min="0" aria-label="{{ 'cart.label.quantity' | t }}">

I found a thread for a different them where the code was much different, but it recommended adding an onblur line, so I changed this code as follows:

<input type="number" class="cart__quantity-selector" name="updates[]" id="updates_{{ item.key }}" value="{{ item.quantity }}" onblur="this.form.submit();" min="0" aria-label="{{ 'cart.label.quantity' | t }}">

This appears to do the trick. 

The second change I made was this...when a visitor clicks 'Add to Cart', I didn't want to take them to the cart page.  Instead, they say put, and links display below the 'Add to Cart' button that read, " Added to cart! View cart or continue shopping."  Here's a link to those instructions if you wish to do the same: https://ecommerce.shopify.com/c/ecommerce-design/t/minimal-theme-add-to-cart-issues-405136. 

ReiNvent
New Member
2 0 0

Thanks a lot!

0 Likes
IFK
New Member
1 0 1

2 years later bumping this up to say thanks.

For anyone else googling how to get your shopify cart to update automatically without clicking the update cart button, this is the best solution I found. There is an app you can install for $1/month but I did not try it. I found other code but that did not update as soon as you changed the quantity, only if you hit enter on the keyboard after changing the quantity. 

This solution here by ICBits is the cleanest and best customer experience.

Christon
Tourist
16 0 0

@ICBits When I update the quantity, it takes me to the checkout page. Can you help me out. I know I'm late but I'm stuck and I can't find any solution. It would be a huge favor. Thanks

0 Likes
Christon
Tourist
16 0 0

@IFK When I update the quantity, it takes me to the checkout page. Can you help me out. I know I'm late but I'm stuck and I can't find any solution. It would be a huge favor. Thanks

0 Likes
liuyanyan
New Member
16 0 1

could kindly to tell me where in cart template should i put the code you offer?

thanks

0 Likes