Notice: End-of-Life Announcement for all Shopify themes by Barrel > Read More

Close

Make “Add to Cart” button automatically redirect to Shopping Cart

By default, the “Add to Cart” button on the product page will show a popup that indicates the item has been added, and the page will not change.

This tutorial will show you how to automatically redirect the customer to the Cart page, instead of showing them the popup.

 

1. Go to Edit HTML/CSS to edit the theme code. Shopify has a guide on how to do this here.

2. In the Templates folder, open the file called product.liquid.

3. Around line 103, you should see the following code:

 <button class="productForm-submit js-productForm-submit" type="submit" name="checkout" data-handle="{{product.handle}}">{{ 'products.form.submit' | t }}</button>

Delete only the text in red above. This line of code should now look like this:

 <button class="productForm-submit" type="submit" name="checkout" data-handle="{{product.handle}}">{{ 'products.form.submit' | t }}</button>

That’s it!