', // default null saleLabelPosition : "after", // default value is same, valid values are after,before,append,prepend }); } 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 = ".productitem--action-trigger.button-secondary"; var gridSelector = ".productitem"; var modalSelector = ".modal-content"; $(document).on("click", quickviewSelector , function() { var productHandle = $(this).parents(gridSelector).find("a").attr("href"); 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 : "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. }); clearInterval(_inverval); } if(check == 10){ clearInterval(_inverval); } }, 500); }); }); **/ /** WholesaleAllInOne.callback = function(data){ console.log("-------------------"); console.log(data); console.log("-------------------"); } **/ // Write down your additional scripts $('.mini_cart').hover(function() { WholesaleAllInOne.cartDrawer(); setTimeout(function(){ console.warn('hover script working') $('li.cart_item.clearfix').each(function(){ var _an_tag = $(this).find('a').attr('href') var _hrf = _an_tag.split('?')[0]+'.js'; _an_tag = _an_tag.split('variant=')[1] var _this = $(this); $.getJSON(_hrf,function(p){ var compare_price = p.compare_at_price; _this.find('.price').attr('data-compare-price',compare_price) }) $(this).find('.price').attr('waio-item-single-id',_an_tag) var _pric = $('li.cart_subtotal .money .money').html() $('.cart_content .cart_subtotal').attr('waio-subtotal',_pric) }) $('.cart_content button.action_button.add_to_cart').attr('name','checkout') var winCheck_coupan = $('.js-cart_content__form .waio-coupon-code-form').length; if (winCheck_coupan <= 0){ $('li.cart_subtotal.js-cart_subtotal').before('