An event which is fired at the document when a Shopify Cart API Ajax request has been just added to the empty Queue of requests.

How it works

Liquid Ajax Cart doesn’t perform Shopify Cart API Ajax requests immediately, it adds them to the Queue.

If there is no request performing at the moment (the Queue is empty) and something initiates a new request (a user clicked an “Add to cart” button” or the request is made by a direct call of the methods get, add, change, update, clear of the liquidAjaxCart object), the request will be added to the Queue, the Liquid Ajax Cart dispatches the liquid-ajax-cart:queue-start event and starts performing the request.

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-start", function() {
  console.log("A queue of requests is started");