Debut Theme - Stop 'Add to Cart' from directing to cart page

Excursionist
16 1 1

Using the latest Debut Theme,  but theme.js does not contain 

 

        .post(params)
        .done(function() {
          window.location.href = '/cart';
        })
        .fail(function(response) {
          self._showErrorMessage(response.responseJSON.description);
        }); 

 

0 Likes
Highlighted
New Member
1 0 0

Hi @JohnnyW-KM  :) adding your extra code

 

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>

 

and removing defer="defer" from vendor.js made the ajax cart work for me but the menu button and search button on mobile stopped working.

 

Backtracking my changes I found that by removing defer="defer" but avoiding adding the script code it works well for me.

 

Thanks again for the tip!

0 Likes