Redirect to cart page once "Add to Cart" is clicked

Is there a way to redirect customers directly to the cart page once they click the “add to cart” button? Am using Dawn theme and you used to be able to simply uncheck a ‘cart drawer’ box, but now that button no longer exists so I’m wondering what to do.

1 Like

@dubs02

Sorry you are facing this issue, it would be my pleasure to help you.

Welcome to the Shopify community! :blush:
Thanks for your good question.

Please share your site URL,
I will check out the issue and provide you a solution here.

Hi @dubs02

To redirect to the cart page once clicking add to cart, please follow these steps:

  1. Go to your Themes > Edit code > Assets > Open produc-form.js > Find this code
this.form.addEventListener('submit', this.onSubmitHandler.bind(this));

(You can hit Ctrl + F (for window) or Command + F (for Mac) and find addEventListener)

  1. Command this code like this.
/* this.form.addEventListener('submit', this.onSubmitHandler.bind(this)); */

If you feel like my answer is helpful, please mark it as a SOLUTION. Let me know if you have any questions!

1 Like

Hi @dubs02 , check out this YouTube video tutorial (https://www.youtube.com/watch?v=5SefePWS5as) for a quick and easy solution to enable side drawer cart or cart page redirect in Shopify Dawn theme after adding to cart.