LED Strip Lights 1
LED Strip Lights – LED Hut infinitePosition ) { pInfScrNode = jQuery(‘.load_more’).final(); pInfScrURL = jQuery(‘.load_more a’).final().attr(“href”); if(!pInfScrLoading && pInfScrNode.size > 0 && pInfScrMore) { jQuery.ajax({ sort: ‘GET’, url: pInfScrURL, beforeSend: operate() { pInfScrLoading = true; jQuery(‘.loading_img’).fadeIn(); }, success: operate(knowledge) { var filteredData = $(knowledge).discover(“.mode-view-item”); jQuery(“.cata-product”).append(filteredData); AT_Main.handleGridList(); jQuery(‘.loading_img’).fadeOut(); pInfScrLoading = false; if(jQuery(knowledge).discover(“.load_more a”).size){ jQuery(‘.load_more a’).final().attr(“href”, jQuery(knowledge).discover(“.load_more a”).final().attr(“href”)); } else{ pInfScrMore = false; jQuery(‘.load_more’).take away(); } }, dataType: “html” }); } } } $(doc).prepared(operate () { $(window).scroll(operate(){ $.doTimeout( ‘scroll’, 100, pInfScrExecute); }); }); ]]>

QTY: ‘ + merchandise.amount + ‘

‘ + Shopify.formatMoney(merchandise.value, ‘£{{quantity}}’) + ‘

‘).appendTo(desk); }); jQuery(‘

Cart Complete’ + Shopify.formatMoney(cart.total_price, ‘£{{quantity}}’) + ‘

‘).appendTo(table_action); } else { jQuery(‘

Your cart is at present empty

‘).appendTo(cart_summary); } } }); } } updateCartDesc(cart); if (window.BOLD && BOLD.frequent && BOLD.frequent.eventEmitter && typeof BOLD.frequent.eventEmitter.emit === ‘operate’){ BOLD.frequent.eventEmitter.emit(‘BOLD_COMMON_cart_loaded’); } }; operate updateCartDesc(knowledge){ if(typeof window.BOLD !== ‘undefined’ && typeof window.BOLD.frequent !== ‘undefined’ && typeof window.BOLD.frequent.cartDoctor !== ‘undefined’) { // NOTE: “cart” ought to be the variable containing the cart json knowledge knowledge = window.BOLD.frequent.cartDoctor.repair(knowledge); } var $cartLinkText = $(‘.cart-target .quantity’); var $cartPrice = Shopify.formatMoney(knowledge.total_price, ‘£{{quantity}}’); change(knowledge.item_count){ case 0: $cartLinkText.html(‘0’); break; case 1: $cartLinkText.html(‘1’); break; default: $cartLinkText.html(” + knowledge.item_count + ”); break; } $cartLinkText.append($cartPrice); $(‘.addcart-modal-subtotal’).html(‘Cart Complete:’ +Shopify.formatMoney(knowledge.total_price, ‘£{{quantity}}’)); // Replace free transport var _cart_total = knowledge.total_price ,_free_shipping_price = 40 ,_free_shipping_price_100 = 40*100; if (_cart_total > _free_shipping_price_100){ $(‘.sb-progress’).html(‘100%’); $(‘.sb-text’).html(‘Free transport for orders over ‘ + Shopify.formatMoney(_free_shipping_price_100, “£{{quantity}}”)); } else{ var _progress = Math.ground(_cart_total / _free_shipping_price) ,_spend = _free_shipping_price_100 – _cart_total; $(‘.sb-progress’).html(” + _progress + ‘%’); $(‘.sb-text’).html(‘Spend ‘ + Shopify.formatMoney(_spend, “£{{quantity}}”) + ‘ attain FREE SHIPPING! Proceed procuring so as to add extra merchandise to your cart and obtain free transport for orders over ‘ + Shopify.formatMoney(_free_shipping_price_100, “£{{quantity}}”)); } if (window.BOLD && BOLD.frequent && BOLD.frequent.eventEmitter && typeof BOLD.frequent.eventEmitter.emit === ‘operate’){ BOLD.frequent.eventEmitter.emit(‘BOLD_COMMON_cart_loaded’); } } Shopify.onCartUpdate = operate(cart) { if(typeof window.BOLD !== ‘undefined’ && typeof window.BOLD.frequent !== ‘undefined’ && typeof window.BOLD.frequent.cartDoctor !== ‘undefined’) { // NOTE: “cart” ought to be the variable containing the cart json knowledge cart = window.BOLD.frequent.cartDoctor.repair(cart); } Shopify.updateCartInfo(cart, ‘#cart-info #cart-content’, ‘shopping-cart’); if (window.BOLD && BOLD.frequent && BOLD.frequent.eventEmitter && typeof BOLD.frequent.eventEmitter.emit === ‘operate’){ BOLD.frequent.eventEmitter.emit(‘BOLD_COMMON_cart_loaded’); } }; $(window).load(operate() { Shopify.getCart(operate(cart) { Shopify.updateCartInfo(cart, ‘#cart-info #cart-content’); }); $(‘.cart-sb’).on(‘click on’, ‘.cart-close’, operate(e){ var prodId = $(e.currentTarget).knowledge(‘cart-item’); $(‘physique’).addClass(‘cart-loading’); $.ajax({ sort: ‘POST’, url: ‘/cart/change.js’, knowledge: { amount: 0, id: prodId }, dataType: ‘json’, error: operate(err){ console.log(err); }, success: operate(resp) { $(‘physique’).removeClass(‘cart-loading’); Shopify.updateCartInfo(resp, ‘#cart-info #cart-content’); if(typeof cartObj != “undefined”) { cartObj.syncCartSB(resp, prodId) } else { Foreign money.convertAll(‘GBP’, Foreign money.currentCurrency); } // Replace free transport var _cart_total = resp.total_price ,_free_shipping_price = 40 ,_free_shipping_price_100 = 40*100; if (_cart_total > _free_shipping_price_100){ $(‘.sb-progress’).html(‘100%’); $(‘.sb-text’).html(‘Free transport for orders over ‘ + Shopify.formatMoney(_free_shipping_price_100, “£{{quantity}}”)); } else{ var _progress = Math.ground(_cart_total / _free_shipping_price) ,_spend = _free_shipping_price_100 – _cart_total; $(‘.sb-progress’).html(” + _progress + ‘%’); $(‘.sb-text’).html(‘Spend ‘ + Shopify.formatMoney(_spend, “£{{quantity}}”) + ‘ attain FREE SHIPPING! Proceed procuring so as to add extra merchandise to your cart and obtain free transport for orders over ‘ + Shopify.formatMoney(_free_shipping_price_100, “£{{quantity}}”)); } } }) }) }); ‘) $(“.qs-quantity .qty-inner .icon-plus”).on(“click on”, operate() { var oldValue = $(“#qs-quantity”).val(), newVal = 1; newVal = parseInt(oldValue) + 1; $(“#qs-quantity”).val(newVal); }); $(“.qs-quantity .qty-inner .icon-minus”).on(“click on”, operate() { var oldValue = $(“#qs-quantity”).val(); if(oldValue > 1){ newVal = 1; newVal = parseInt(oldValue) – 1; $(“#qs-quantity”).val(newVal); } }); // Replace product picture productImage.html(”); var qs_images = productSelect.photographs; productImage.append(”); if(qs_images.size >= 1){ $.every(qs_images, operate(index, worth) { productImage.discover(‘#gallery-qs-image’).append(‘LED Strip Lights 2‘); }); } else{ productImage.html(‘LED Strip Lights 3‘); } // Replace product title productTitle.html(” + productSelect.title + ”); // Replace product creator productAuthor.html(” + productSelect.vendor + ”); // Replace product description var $prod = $this.closest(“.product-wrapper”); productRating.html($prod.discover(“.product-review”).html()); productDescription.html($prod.discover(“.product-des-list”).html()); // Produc variants var productVariants = productSelect.variants; var productVariantsCount = productVariants.size; productPrice.html(”); productVariantWrapper.html(”); productAddCart.removeAttr(‘disabled’).fadeTo(200,1); if (productVariantsCount > 1) { // Present Variants productVariantWrapper.present(); // Variants aspect var productVariantElement = $(”,{ ‘id’: (‘#quick-shop-variants-‘ + productSelectID) , ‘title’: ‘id’}); var productVariantOptions = ”; for (var i=0; i < productVariantsCount; i++) { productVariantOptions += ''+ productVariants[i].title +'' }; // Add variants aspect on web page productVariantElement.append(productVariantOptions); productVariantWrapper.append(productVariantElement); // Bind variants to option_selection JS new Shopify.OptionSelectors(('#quick-shop-variants-' + productSelectID), { product: productSelect, onVariantSelected: selectQSOptionCallback }); // Add label if just one product choice if (productSelect.choices.size == 1){ $('#qs-product-action .selector-wrapper:eq(0)').prepend(''+ productSelect.choices[0].title +''); } // Choose first variant on web page var found_one_in_stock = false; for (var i=0; i < productSelect.variants.size; i++) { var variant = productSelect.variants[i]; if(variant.obtainable && found_one_in_stock == false) { found_one_in_stock = true; for (var j=0; j < variant.choices.size; j++){ $('#qs-product-variants .single-option-selector:eq('+ j +')').val(variant.choices[j]).set off('change'); } } } } else { // Cover pointless variants productVariantWrapper.disguise(); // Construct variants aspect var productVariantElement = $('',{ 'id': ('#quick-shop-variants-' + productSelectID) , 'title': 'id'}); var productVariantOptions = ''; for (var i=0; i < productVariantsCount; i++) { productVariantOptions += ''+ productVariants[i].title +'' }; // Add variants element on page productVariantElement.append(productVariantOptions); productVariantWrapper.append(productVariantElement); // Update the add button to variant id productAddCart.data('variant-id', productVariants[0].id); // Check product is on sale if ( productVariants[0].compare_at_price > 0 && productVariants[0].compare_at_price > productVariants[0].value ) { productPrice.html(”+ Shopify.formatMoney(productVariants[0].value, ‘£{{quantity}}’) +” + ”+ Shopify.formatMoney(productVariants[0].compare_at_price, ‘£{{quantity}}’) + ”); } else { productPrice.html(”+ Shopify.formatMoney(productVariants[0].value, ‘£{{quantity}}’) + ” ); } if (productSelect.obtainable) { productAddCart.removeAttr(‘disabled’).fadeTo(200,1); productAddCart.html(‘Add to cart’); // chosen an invalid or out of inventory variant } else { // disabled variant would not exist productAddCart.attr(‘disabled’, ‘disabled’).fadeTo(200,0.5); var message = variant ? “Offered Out” : “Offered Out”; productAddCart.html(message); } } }); }); // selectQSOptionCallback var selectQSOptionCallback = operate(variant, selector) { // chosen a legitimate and in inventory variant if (variant && variant.obtainable) { productAddCart.knowledge(‘variant-id’, variant.id); productAddCart.removeAttr(‘disabled’).fadeTo(200,1); productAddCart.html(‘Add to cart’); // chosen an invalid or out of inventory variant } else { // disabled variant would not exist productAddCart.attr(‘disabled’, ‘disabled’).fadeTo(200,0.5); var message = variant ? “Offered Out” : “Offered Out”; productAddCart.html(message); } // verify if variant is on sale if ( variant.compare_at_price > 0 && variant.compare_at_price > variant.value ) { productPrice.html(”+ Shopify.formatMoney(variant.value, ‘£{{quantity}}’) +” + ”+ Shopify.formatMoney(variant.compare_at_price, ‘£{{quantity}}’) + ”); } else { productPrice.html(”+ Shopify.formatMoney(variant.value, ‘£{{quantity}}’) + ” ); }; } }); ]]>

Source