jonnykates
3/29/2018 - 8:50 AM

Fake check basket for items

// Check for basket item(s)
function checkBasket() {
  setTimeout(function() {
    var spanVal = $('#menuAdmin .menuAdminBasket span:last-child').text();

    if(spanVal !== '(0 items)') {
      $('body').addClass('basket-has-items');
    }
  }, 500);
}

$(document).ready(function() {
  checkBasket();
})

$('.addToBasket').on('click', function() {
  checkBasket();
});