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

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

Foysal 0


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.

Tags:

Foysal

I'm a Web Designer, eCommerce Business Developer based in Habiganj. I specialize in creating e-commerce business websites for great individuals and small-medium sized businesses, helping them to market their products or services successfully on the web. Interested in working together? Get in touch so we can discuss your requirements.

Leave a Reply