I am currently rebuilding my Shopify and unfortunately I am stuck at one point.
I would like that when you click on the button “Add to cart” opens the sidebar shopping cart.
Currently, however, it is so that when you click on “Add to Cart” you are directed to the whole page “Shopping Cart”. I would like to prevent this.
I am working on the dawn theme.
I hope someone can help me or can give me some advice. I would be grateful for any support.
To open the sidebar cart when a customer clicks the “Add to cart” button instead of redirecting them to the shopping cart page, you will need to modify the theme code. Here’s how to do it in the Dawn theme:
Go to your Shopify admin dashboard and click on “Online Store”, then “Themes”.
Click on the “Actions” button next to the Dawn theme and select “Edit code”.
Open the “sections” folder and click on the “cart-drawer.liquid” file.
Scroll down to the bottom of the file and find the following code:
{{ form | payment_button }}
{{ form | submit_button }}
replace that code with:
{{ form | payment_button }}
Next, open the “assets” folder and click on the “theme.js” file.
Hi @Kuelah , found the solution for enabling the side drawer cart or cart page redirect in Shopify Dawn theme after clicking “Add to Cart” in this helpful YouTube video: https://www.youtube.com/watch?v=5SefePWS5as.