How to redirect add to cart button to cart page?!

Hey I am trying to redirect my ADD TO CART button to go straight to my cart page instead of staying on product page

below is my product.liquid code if anyone knows where/what I need to change!

I am using Debut theme

{% include ‘spurit_stp-product-snippet’ %}

{% comment %}
The contents of the product.liquid template can be found in /sections/product-template.liquid
{% endcomment %}

{% section ‘product-template’ %}
{% section ‘product-recommendations’ %}

{% if collection %}

{% endif %}

{% assign current_variant = product.selected_or_first_available_variant %}

Hi @emmaormesher

If you want to remove ajax add to cart and want to send user to cart page after add to cart then follow this:

  1. open Section->product-template.liquid → find class “product-form__cart-submit” and remove this class.

  2. open Asset->theme.scss file add below code at bottom of page:

[name="add"]{width:100%;}

Hi, someone can help. How to change the setting of the “Add to cart” button. After adding to the cart, it immediately redirects to the cart, how to cancel it?

Which theme you have and send store url,

you have to find ajax cart function in asset->theme.js file where from you can set 'location.href=“/cart” in success function.

https://katypresets.myshopify.com/

Theme - Debut

Thx

As i can see you can not redirect to cart page after adding to cart.

No, this is exactly what I wanted, thanks, I found a solution to this problem.

I’m having issues with the same problem - add to cart doesn’t go to cart page. Can anyone assist?

Send your store url

Hello I am having the exact same problem. I want my customers to click on “Add to Cart” and be redirected to “View Cart” page. How should I do it?

Send your store url

mart-prestige.myshopify.com/
Thanks a lot.

GO to Asset->theme.js file and find:

this._setupCartPopup(item);

Now comment it and add below code next to this line:

location.href=‘/cart’;

Look like this:

Hi there,

I’m looking for the same thing, I would like to redirect people to the cart after clicking on Add To Cart. I have Narrative theme, can you help?

Website: https://boostedself.com/

Thank you

Hi @Blts03

Follow this:

  1. Go to Theme editor

  2. Open Theme setting tab

  3. Go to “Cart drawer” and un-check “Show cart drawer” option and save.

Thanks that worked!!!

In future I will likely want to test taking them directly to checkout as apposed to the cart, how would I do that?

Cheers

You can enable “dynamic buy button” from theme editor->product page.

That take user to direct checkout, but if you want with add to cart button then need custom code.

Hi there,

i need the same for my store: la-pietra.myshopify.com

Can you help me?

Regards.

for your store need to check in code cant say direct much Js error may be affecting.

so may you need an access?