How to redirect to cart after "add to cart" - Debut Theme

How to redirect to cart after “add to cart” – Debut Theme


I have created a single product Shopify online store for one of my clients as part of my eCommerce Service Provider business. My client only has 1 product. But the problem he and I face that when customers click on the “add to cart” button they stay on the same page. Actually, that is not good UX rules because as there no more products than customers no need to stay on the same page. It’s just 1 unnecessary click and surely leads to abandoned carts.

SO in the tutorial, I am going to fix this issue how to how to redirect to cart after “add to cart” – Debut Theme. This tutorial will be very helpful if you are using Shopify Debut Theme.

Find this code In asset->theme.js->find “$.post(params)“.

If your theme contain this then follow this:

add location.href=”/cart”;

So it look like:

$.post(params)
        .done(
          function(item) {
            this._hideErrorMessage();
            this._setupCartPopup(item);
             location.href="/cart";
          }.bind(this)
        )
Shopify Expert
Shopify Expert

Want to modify or custom changes on store Hire Me.

Leave a Reply