Cart update button sending to checkout (brooklyn)

Highlighted
New Member
2 0 1

Hi Everyone!

Iv'e got a problem with my "Update cart" button.

I installed multilingo app and tried adding the update cart and continue shopping buttons to my theme.

I have done this on my other stores and it worked properly.

What happens now is that every time I click update cart I get sent to the checkout, and the cart indeed gets updated, but I want to stay on the cart page.

this is the code for all three of my buttons (continue shopping, update cart and checkout).

 


<a href="/collections/" title="Continue shopping" class="btn--secondary continue shopping">Continue shopping</a>
<br>
<button type="submit" name="update" class="btn--secondary update-cart">{{ 'cart.general.update' | t }</button>
<button type="submit" name="checkout" class="btn cart__checkout">

 

Could anyone please help me fix the update cart button so it works properly?

Thanks in advance!

0 Likes
Highlighted
New Member
1 0 0

I am having a similar issue with the Minimal theme (though, I'm really not sure when our issue started as I was just recently informed it was an issue). Through searching around, it appears there's an issue with having "submit" as the button type. If you change it to say, button type="button", the button does nothing, obviously , but at least it doesn't send you to checkout? I've been searching around everywhere now and have tried multiple things, but nothing is working.. so, the button is hidden for now. The code for the Minimal theme is similar to yours (below); so, I'm hoping that whoever answers this question can knock it out for Minimal theme users, as well.

 

<a class="btn btn--secondary" href="/collections/all">{{ 'cart.general.continue_shopping' | t }}</a>
<button type="submit" name="update" class="btn--secondary update-cart">{{ 'cart.general.update' | t }}</button>
<button type="submit" name="checkout" class="btn">{{ 'cart.general.checkout' | t }}</button>

 

0 Likes
Highlighted
Tourist
15 0 0

Any luck with this??

 

0 Likes
Highlighted

@Christon

Use my email to send me access to your store, I'll have a look at your code and see what adjustments I can make to solve it

If my answer was helpful please Like and Accept my post as the Solution
Need help customizing your store? Contact me on email at Defineify@gmail.com
Highlighted
Tourist
15 0 0

Sure thing. Really appreciated. thanks

0 Likes
Highlighted

Hi @Christon 

I see what you did, you added a quantity selector but that doesn't really do justice.

It goes to checkout because you had a onclick event saying submit the form when you adjust the up and down arrow keys.

The form itself is to go to checkout.

If my answer was helpful please Like and Accept my post as the Solution
Need help customizing your store? Contact me on email at Defineify@gmail.com
0 Likes
Highlighted
Tourist
15 0 0

Yes i get it. But, I then tried to import the same theme again. It was without any edit. It still took me to checkout when I had the update now button. It was untouched. The same form had an update now button with type="submit". It came with the theme. I removed it

0 Likes
Highlighted

@ChristonLett I see what I can do

FYI about that submit, that update cart doesn't submit to checkout, it updates by using the name class update.

If my answer was helpful please Like and Accept my post as the Solution
Need help customizing your store? Contact me on email at Defineify@gmail.com
0 Likes
Highlighted
Tourist
15 0 0

I'll put that button again with name update just like it was. It'll still take you to the checkout. I'll remove the onclick too. 

0 Likes
Highlighted

@ChristonCan you accept the free trial, lets see how it works if it just submits and stays on the page

It wont charge you. Just choose a plan.

If my answer was helpful please Like and Accept my post as the Solution
Need help customizing your store? Contact me on email at Defineify@gmail.com
0 Likes