Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the ninja-forms domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/u908759592/domains/ecommercethesis.com/public_html/wp-includes/functions.php on line 6114
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