An event which is fired at the document
when a Liquid Ajax Cart has executed
all the Shopify Cart API Ajax requests from the Queue and
it is switching back to the “idle” mode.
Liquid Ajax Cart doesn’t perform Shopify Cart API Ajax requests immediately, it adds them to the Queue.
When a request is executed, it is removed from the Queue.
If there is no other request to perform, Liquid Ajax Cart triggers the liquid-ajax-cart:queue-end
event.
The detailed explanation on when each event is fired and what exactly happens before and after each event is in the “Lifecycle, events, API” guide.
document.addEventListener("liquid-ajax-cart:queue-end", function() {
console.log("A queue of requests is finished");
console.log("The current cart state is: ", window.liquidAjaxCart.cart);
});
Use this event when you want to:
Code examples with this event: