$1,392.00
if (variant && variant.available) {
jQuery('#add-to-cart').removeAttr('disabled').removeClass('disabled'); // remove unavailable class from add-to-cart button, and re-enable button
if(variant.price < variant.compare_at_price){
jQuery('#price-preview').html(Shopify.formatMoney(variant.price, "
${{amount}}") + "
" + Shopify.formatMoney(variant.compare_at_price, "${{amount}}") + "");
} else {
jQuery('#price-preview').html(Shopify.formatMoney(variant.price, "
${{amount}}"));
}
} else {
jQuery('#add-to-cart').addClass('disabled').attr('disabled', 'disabled'); // set add-to-cart button to unavailable class and disable button
var message = variant ? "Sold Out" : "Unavailable";
jQuery('#price-preview').text(message);
}
$1,392.00