Autopilot - AJAX cart fix
S
Written by Support
Updated over a week ago

Add this JavaScript before the </body> in theme.

let interval_check;
interval_check = setInterval(checkAI, 500);
function checkAI() {
if(typeof(my_offers) != "undefined" && my_offers!= null){
clearInterval(interval_check);
// debugger;
for(var i = 0; i < my_offers.length; i++){
if(my_offers[i].offerable_type == "auto"){
my_offers[i].in_ajax_cart = true;
InCartUpsell.prototype.findOfferWhenReady();
}
}
}
}

Did this answer your question?