', // default null saleLabelPosition : "before", // default value is same, valid values are after,before,append,prepend }); },5000); } else{ console.warn("ALERT! 'Wholesale All In One' was disabled"); } // Method One - Quick view /** window.selected_variant_id =	PRODUCT_OBJECT_VARIABLE.selected_variant_id; window.current_product =	PRODUCT_OBJECT_VARIABLE.product; WholesaleAllInOne.quickView({ productId : window.current_product, //provide current product id variantId : window.selected_variant_id, //provide selected variant id price : "default", //provide selected variant's price or product price priceDesign : "default", //price design can override existing style of price shown saleBadgeDirectParent : "default", //find value SaleBadgeDirectChild : "default", //find value saleLabelHTML : "default", //default value is 'Saved [[saved_amount]]'. This string must include [[saved_amount]] saleLabelMode : "default", //default value 'percent', others 'fixed_amount' saleLabelPosition : "same", // default value is same, valid values are after,before,append,prepend quickView : true, //boolean, default false. Can be true or false quickViewQBSelector : "default", //where quantity break table will shown, Default value???? priceSelector : "default", //default value is 'waio' qbTableSelector : "default", //default value is '.add-to-cart' button; quickViewHandleAttr: "data-handle", quickViewButton: ".quick-view-button", // productHandle: productHandle, // Product handle is required only when product price or id is not found or undefined. }); **/ // Method TWO - Quick view $(document).ready(function(){ var quickviewSelector = ".product-modal"; var gridSelector = ".owl-item, .product-index"; var modalSelector = ".fancybox-opened .fancybox-inner"; $(document).on("click", quickviewSelector , function() { var productHandle = $(this).parents(gridSelector).find(".prod-image a").attr("href"); productHandle = productHandle.split('/products/')[1]; productHandle = productHandle.split('?')[0]; console.log(productHandle); var check = 0; var _inverval = setInterval(function(){ check = check + 1; if($(modalSelector).find("form[action='/cart/add']").length){ WholesaleAllInOne.quickView({ productId : "default", //provide current product id variantId : "default", //provide selected variant id price : "default", //provide selected variant's price or product price priceDesign : "default", //price design can override existing style of price shown saleBadgeDirectParent : "default", //find value SaleBadgeDirectChild : "default", //find value saleLabelHTML : "default", //default value is 'Saved [[saved_amount]]'. This string must include [[saved_amount]] saleLabelMode : "default", //default value 'percent', others 'fixed_amount' saleLabelPosition : "same", // default value is same, valid values are after,before,append,prepend quickView : true, //boolean, default false. Can be true or false quickViewQBSelector : ".fancybox-opened .fancybox-inner #AddToCartForm:after", //where quantity break table will shown, Default value???? priceSelector : ".fancybox-opened .fancybox-inner .product-prices", //default value is 'waio' qbTableSelector : "default", //default value is '.add-to-cart' button; quickViewHandleAttr: "data-handle", quickViewButton: ".quick-view-button", productHandle: productHandle, // Product handle is required only when product price or id is not found. }); setTimeout(function(){ var Vid = $('[name="id"]').val(); selected_variant_id = Vid; var _indx = current_product.variants.findIndex(function(x){return x.id == Vid}) if(_indx > -1){ var _price = current_product.variants[_indx].price; } WholesaleAllInOne.productTemplate({ productId : "default", //provide current product id variantId : Vid, //provide selec ted variant id price : _price, //provide selected variant's price or product price priceDesign : "default", //price design can override existing style of price shown saleBadgeDirectParent : "default", //find value SaleBadgeDirectChild : "default", //find value saleLabelHTML : "default", //default value is 'Saved [[saved_amount]]'. This string must include [[saved_amount]] saleLabelMode : "default", //default value 'percent', others 'fixed_amount' saleLabelPosition : "default", // default value is same, valid values are after,before,append,prepend quickView : "default", //boolean, default false. Can be true or false quickViewQBSelector : "default", //where quantity break table will shown, Default value form[action='/cart/add'] priceSelector : ".product-prices", //default value is 'waio' qbTableSelector : "form[action='/cart/add']:after", //default value is '.add-to-cart' button; }); },1000); clearInterval(_inverval); } if(check == 10){ clearInterval(_inverval); } }, 500); }); }); /** WholesaleAllInOne.callback = function(data){ console.log("-------------------"); console.log(data); console.log("-------------------"); } **/ // Write down your additional scripts $(document).on('change','.fancybox-opened .fancybox-inner .selector-wrapper .single-option-selector',function(){ setTimeout(function(){ var Vid = $('[name="id"]').val(); selected_variant_id = Vid; var _indx = current_product.variants.findIndex(function(x){return x.id == Vid}) if(_indx > -1){ var _price = current_product.variants[_indx].price; } WholesaleAllInOne.productTemplate({ productId : "default", //provide current product id variantId : Vid, //provide selected variant id price : _price, //provide selected variant's price or product price priceDesign : "default", //price design can override existing style of price shown saleBadgeDirectParent : "default", //find value SaleBadgeDirectChild : "default", //find value saleLabelHTML : "default", //default value is 'Saved [[saved_amount]]'. This string must include [[saved_amount]] saleLabelMode : "default", //default value 'percent', others 'fixed_amount' saleLabelPosition : "default", // default value is same, valid values are after,before,append,prepend quickView : "default", //boolean, default false. Can be true or false quickViewQBSelector : "default", //where quantity break table will shown, Default value form[action='/cart/add'] priceSelector : ".product-prices", //default value is 'waio' qbTableSelector : ".fancybox-opened .fancybox-inner #AddToCartForm:after", //default value is '.add-to-cart' button; }); },1000); }); setTimeout(function(){ var g = 0; var pri = 0; var ids = 0; $('.product-index').each(function(){ var _this = $(this); var handle = _this.find('.product-info a').attr('href'); if(handle != undefined){ handle = handle.split('/products/')[1]; handle = handle.split('?')[0]; console.log(handle) jQuery.getJSON('/products/'+handle+'.js', function(product) { $(product.variants).each(function(e){ pri = parseInt(product.variants[e].price); if(pri < g){ console.log(product.variants[e].id); ids = product.variants[e].id; _this.find('.mins').attr('data-item-id', ids); }else{ g = product.variants[e].price; } }) }); } }); },1000); // Netterm start WholesaleAIO.netTerms = {"shop":"rinea.myshopify.com","enabled":true,"disable_checkout":false,"show_delivery_date":true,"show_payment_mode":true,"payment_options":"Net 15, Net 30, Net 45","owner_email_notify":true,"customer_email_notify":false,"cart_message":"Net order terms","checkout_btn_label":"Net 15\/30 Orders Checkout","messages":{"confirmation":"Please review your order below","thank_you":"Your order has been successfully placed. You will receive an email with an online invoice including applicable taxes and assessed shipping charges."},"customers_tag":"WSNET","customers_group":"tag_based","send_invoice":false,"price_design":"3","order_method":"draft_order"} || {}; console.log("WholesaleAIO.netTerms", WholesaleAIO.netTerms); WholesaleAllInOne.apply_net_terms = function(config){ if("undefined"===typeof config)var config={}; null===config&&(config={}); var checkoutSelector = config.checkoutSelector || waioSelectors.checkout; var paymentOptions = config.payment_options || []; var default_payment_option = config.default_payment_option || ''; var customer_addresses = null; var customer_id = ''; var show_delivery_date = config.show_delivery_date; var show_payment_mode = config.show_payment_mode; var onlyNetTerms = config.onlyNetTerms?true:false; var netTerm_Button_Text = config.netTerm_Button_Text || 'NET ORDERS CHECKOUT'; var netTerm_Label_Text = config.cart_message || ''; var messages = config.messages || []; console.log('================================='); var _BtnHtml = ''+ '