Shopify.doNotTriggerClickOnThumb = false; var selectCallbackQuickview = function(variant, selector) { var productItem = jQuery('.quick-view .product-item'); addToCart = productItem.find('.add-to-cart-btn'), productPrice = productItem.find('.price'), comparePrice = productItem.find('.compare-price'), totalPrice = productItem.find('.total-price span'); if (variant) { if (variant.available) { // We have a valid product variant, so enable the submit button addToCart.removeClass('disabled').removeAttr('disabled').text('Add to Cart'); } else { // Variant is sold out, disable the submit button addToCart.val('Sold Out').addClass('disabled').attr('disabled', 'disabled'); } // Regardless of stock, update the product price productPrice.html(Shopify.formatMoney(variant.price, "£{{amount}}")); // Also update and show the product's compare price if necessary if ( variant.compare_at_price > variant.price ) { comparePrice .html(Shopify.formatMoney(variant.compare_at_price, "£{{amount}}")) .show(); productPrice.addClass('on-sale'); } else { comparePrice.hide(); productPrice.removeClass('on-sale'); } // BEGIN SWATCHES var form = jQuery('#' + selector.domIdPrefix).closest('form'); for (var i=0,length=variant.options.length; i