Skip to content Scheduled Maintenance
Phonedaddy.com will be down for scheduled maintenance
This store will be powered by Store owner? Login here
') }; if( window.wsaio_involved != undefined && window.wsaio_involved == true && WSAIO.app_mode_applied){ WSAIO.showCheckoutLoader() } window.addEventListener("load", function(){ var $ = jQuery; if(typeof WSAIO != 'undefined'){ WSAIO.loginLink(); if(typeof window.ZapietCheckoutEnabled != 'undefined'){ var valid_chk = false; setInterval(function(){ if(window.ZapietCheckoutEnabled && valid_chk == false){ if(typeof WSAIO.checkoutEventListner != 'undefined'){WSAIO.checkoutEventListner()} valid_chk =true; }else if(!window.ZapietCheckoutEnabled && valid_chk == true){ valid_chk =false; } },100) } if("function"===typeof WSAIO.initAddons){ WSAIO.initAddons(jQuery || $); } if(typeof current_product != 'undefined' && current_product != null){ $('.wsaio_'+current_product.id).parents(WSAIO.product_parent_grid_selector).find('.wsaio_buynow').css('cssText','display:inline-block !important') } try{WSAIO.buyNowEventListener()}catch(e){} if( window.wsaio_involved != undefined && window.wsaio_involved == true && WSAIO.app_mode_applied){ WSAIO.cart_qty_change_event(); } setTimeout(function(){ if((typeof WSAIO != 'undefined' && typeof WSAIO.cartDrawer === 'function' && WSAIO.template === "cart") || (typeof WSAIO != 'undefined' && window.location.pathname.indexOf('pages/net-term-order') > -1 )){ if(!jQuery.isEmptyObject(WSAIO.discount_response)){ WSAIO.preCheckoutResponse(WSAIO.discount_response) WSAIO.callback(WSAIO.discount_response) if(typeof WSAIO.loadcartQuantityControllers != 'undefined' && typeof WSAIO.load_checkout_restriction != 'undefined'){ WSAIO.load_checkout_restriction(); WSAIO.loadcartQuantityControllers([],function(e){WSAIO.run_checkout()});}else{WSAIO.run_checkout()} }else{ WSAIO.preCheckout(); } } if(WSAIO.agreement_checkout_selector != '' && $(WSAIO.agreement_checkout_selector).length != 0 && window.wsaio_involved != undefined && window.wsaio_involved == true && WSAIO.app_mode_applied){ if($(WSAIO.agreement_checkout_selector).is(':checked')){ window.isAgree = true; WSAIO.run_checkout() }else{ window.isAgree = false; WSAIO.run_checkout() } $(document).on('click', WSAIO.agreement_checkout_selector, function (e) { if($(WSAIO.agreement_checkout_selector).is(':checked')){ window.isAgree = true; WSAIO.run_checkout() }else{ window.isAgree = false; WSAIO.run_checkout() } }) } setTimeout(function(){ /* ----------for without login show checkout -------------- */ try{ if(WSAIO != undefined && !WSAIO.main_liquid_file_included && (typeof WSAIO.isShowCheckout == 'undefined')){ $(WSAIO.checkout_selector+','+WSAIO.duplicate_checkout_selector).removeClass('wsaio_hideCheckout') $('.wsaio_coupon_group, .wsaio_coupon_link').css('cssText','display:block !important') } }catch(e){} /* ----------for login show checkout -------------- */ try{ if((WSAIO != undefined || WSAIO.main_liquid_file_included) && (typeof WSAIO.isShowCheckout == 'undefined')){ $(WSAIO.checkout_selector+','+WSAIO.duplicate_checkout_selector).removeClass('wsaio_hideCheckout') $('.wsaio_coupon_group, .wsaio_coupon_link').css('cssText','display:block !important') } }catch(e){} /* ----------if app undefined show checkout -------------- */ try{ if(WSAIO == undefined || !WSAIO.isWholesaleCustomer() && (typeof WSAIO.isShowCheckout == 'undefined')){ $(WSAIO.checkout_selector+','+WSAIO.duplicate_checkout_selector).removeClass('wsaio_hideCheckout') $('.wsaio_coupon_group, .wsaio_coupon_link').css('cssText','display:block !important') } }catch(e){} if(WSAIO.buy_now_btn_replace == false || typeof WSAIO.buyNowEventListener == 'undefined' ){ $('.shopify-payment-button .shopify-payment-button__button').css('cssText','display:inline-block !important') } $('.wsaio_loader_checkout').hide(); },1000); if(typeof current_product != 'undefined' && current_product != null){ $('.wsaio_'+current_product.id).parents(WSAIO.product_parent_grid_selector).find('.wsaio_buynow').css('cssText','display:inline-block !important') if(WSAIO.buy_now_btn_replace == false){ $(WSAIO.product_parent_grid_selector).find('.wsaio_buynow').remove() $('.wsaio_'+current_product.id).parents(WSAIO.product_parent_grid_selector).find('.shopify-payment-button .shopify-payment-button__button').css('cssText','display:inline-block !important') } } },1050) }else{ $(WSAIO.checkout_selector+','+WSAIO.duplicate_checkout_selector).removeClass('wsaio_hideCheckout') $('.wsaio_loader_checkout').hide(); $('.shopify-payment-button .shopify-payment-button__button').css('cssText','display:inline-block !important') } }); WSAIO.run_checkout = function(){ if(WSAIO.app_mode_applied){ $('.wsaio_coupon_group, .wsaio_coupon_link').css('cssText','display:block !important') WSAIO.checkoutAlert = $('
') /* ==================replace checkout button =============================== */ if(WSAIO.replace_checkout){ $(WSAIO.replace_checkout_button).replaceWith(WSAIO.duplicate_checkout_html) if(typeof WSAIO.checkoutEventListner != 'undefined' && typeof WSAIO.isWholesaleCustomer != 'undefined' && WSAIO.isWholesaleCustomer() !== false){ WSAIO.checkoutEventListner() }else{ if(WSAIO.replace_checkout){ $(document).on('click',WSAIO.checkout_selector+','+WSAIO.duplicate_checkout_selector, function (e) { e.preventDefault(); e.stopImmediatePropagation(); e.stopPropagation(); window.location.href = '/checkout'; }); } } } /* ==================order limit =============================== */ WSAIO.order_control();WSAIO.disableCheckout() if(WSAIO.default_limit){ if(typeof WSAIO.allow_normal_checkout__OC == 'undefined' || WSAIO.allow_normal_checkout__OC == false){ WSAIO.checkoutAlert.append('
' + WSAIO.checkout_message + ""); }else{ WSAIO.checkoutAlert.append('
' + WSAIO.checkout_message + ""); WSAIO.checkoutAlert.append('
Fulfill minimum order requirements to avail discount'); } } /* ==================Shipping =============================== */ if(WSAIO.applied_shipping != undefined && WSAIO.applied_shipping.apply_shipping_charges && $('.Shipping_msg').length == 0 && WSAIO.shipping_message_applied){ WSAIO.checkoutAlert.after('
' + WSAIO.applied_shipping.final_ship_rule.message + "
"); } /* ==================Show Checkout button =============================== */ if(typeof WSAIO.isShowCheckout == 'undefined'){ $(WSAIO.checkout_selector+','+WSAIO.duplicate_checkout_selector).removeClass('wsaio_hideCheckout') }else{ $(WSAIO.checkout_selector+','+WSAIO.duplicate_checkout_selector).addClass('wsaio_hideCheckout') } $('.wsaio_coupon_group, .wsaio_coupon_link').css('cssText','display:block !important') /* ==================Append all Alerts =============================== */ $('.wsaio-alerts').remove(); $('.waio_agree_message').remove() if(typeof window.MOQ_alert != 'undefined' && window.MOQ_alert!=''){ WSAIO.checkoutAlert = window.MOQ_alert; }else{ if($('.wsaio-alerts').length == 0 && WSAIO.checkoutAlert != undefined){ $(WSAIO.checkout_message_selector).after(WSAIO.checkoutAlert); } } WSAIO.cartLevelUpSell(); $('.wsaioUsellMessage,.Shipping_msg').remove(); if(WSAIO.wsaioUpSell_msg != undefined && WSAIO.wsaioUpSell_msg!= '' && $('.wsaioUsellMessage').length == 0){ if(typeof WSAIO.cart_level_upsell_message_select == 'undefined' || WSAIO.cart_level_upsell_message_select == ''){ $(WSAIO.checkout_message_selector).before('
' + WSAIO.wsaioUpSell_msg + "
"); }else{ $(WSAIO.cart_level_upsell_message_select).before('
' + WSAIO.wsaioUpSell_msg + "
"); } } if(WSAIO.applied_shipping != undefined && WSAIO.applied_shipping.apply_shipping_charges && $('.Shipping_msg').length == 0 && WSAIO.shipping_message_applied){ $(WSAIO.checkout_message_selector).after('
' + WSAIO.applied_shipping.final_ship_rule.message + "
"); } if($('.wsaio-alerts').length == 0 && WSAIO.checkoutAlert != undefined && typeof window.MOQ_alert != 'undefined' && WSAIO.checkoutAlert.indexOf('
- -1){ $(WSAIO.checkout_message_selector).after(WSAIO.checkoutAlert); } /* ==================Disabled Enable Checkout =============================== */ if(WSAIO.disable_checkout || window.disable_checkout_MOQ || window.isAgree == false){ if(WSAIO.agrrement_alert_message != '' && $('.waio_agree_message').length == 0 && typeof window.isAgree != 'undefined' && window.isAgree == false){ $(WSAIO.checkout_message_selector).after('
'+WSAIO.agrrement_alert_message+'
'); } if((typeof WSAIO.allow_normal_checkout__OC != 'undefined' && WSAIO.allow_normal_checkout__OC) && ((!window.disable_checkout_MOQ || $('.moq_error').length == 0) && (typeof window.isAgree == 'undefined' || window.isAgree))){ $(WSAIO.netTerm_checkout_selector).addClass('checkout-disabled').attr('disabled','disabled').css({'pointer-events': 'none','cursor': 'default'}) }else{ $(WSAIO.checkout_selector+','+WSAIO.duplicate_checkout_selector+','+WSAIO.netTerm_checkout_selector).addClass('checkout-disabled').attr('disabled','disabled').css({'pointer-events': 'none','cursor': 'default'}) } }else{ $(WSAIO.checkout_selector+','+WSAIO.duplicate_checkout_selector+','+WSAIO.netTerm_checkout_selector).removeClass('checkout-disabled').removeAttr('disabled').css({'pointer-events': 'auto','cursor': 'pointer'}) } /* ==================================== =============================== */ $('.wsaio_loader_checkout').hide(); } } window.addEventListener("load",function(){ if(typeof WSAIO != 'undefined' && window.wsaio_involved != undefined && window.wsaio_involved == true && typeof WSAIO.preCheckout == 'undefined' && WSAIO.app_mode_applied){ WSAIO.preloadCheckout = function (){ WSAIO.showCheckoutLoader(); try { "undefined" === typeof window.waioMOC && (window.waioMOC = {}); "undefined" === typeof waioMOC.cart && (waioMOC.cart = {}); try { window.cart_data = WSAIO.cart_object; waioMOC.cart["item_count"] = WSAIO.cart_object.item_count; waioMOC.cart["original_total_price"] = WSAIO.cart_object.original_total_price; WSAIO.order_control() setTimeout(function(){ if(typeof WSAIO.loadcartQuantityControllers != 'undefined' && typeof WSAIO.load_checkout_restriction != 'undefined'){ WSAIO.load_checkout_restriction(); WSAIO.loadcartQuantityControllers([],function(e){setTimeout(function(){WSAIO.run_checkout()},1000)});}else{WSAIO.run_checkout()} },1000) } catch (e) {} } catch (e) {} }; WSAIO.preCheckout = function (){ if(typeof WSAIO.run_checkout != 'undefined'){ WSAIO.showCheckoutLoader() $.getJSON(WSAIO.local_param +'cart',function(e){ window.cart_data = e; try { "undefined" === typeof window.waioMOC && (window.waioMOC = {}); "undefined" === typeof waioMOC.cart && (waioMOC.cart = {}); try { waioMOC.cart["item_count"] = e.item_count; waioMOC.cart["original_total_price"] = e.original_total_price; WSAIO.order_control() if(typeof WSAIO.cartQuantityControllers != 'undefined' && typeof WSAIO.checkout_restriction != 'undefined'){ WSAIO.checkout_restriction(); WSAIO.cartQuantityControllers([],function(e){setTimeout(function(){WSAIO.run_checkout()},500)});}else{WSAIO.run_checkout()} } catch (e) {} } catch (e) {} }) } }; WSAIO.preloadCheckout(); } }) }; '); window.disable_checkout_MOQ = true; } } else{ _limitsUl.append('- '+_errorMsg+'
'); window.disable_checkout_MOQ = true; } } } } } } }) }) if((WSAIO.checkout_message!='' && WSAIO.disable_checkout) || !WSAIO.checkout_requirements){ if(typeof WSAIO.checkout_message != 'undefined' && WSAIO.default_limit){ if(typeof WSAIO.allow_normal_checkout__OC == 'undefined' || WSAIO.allow_normal_checkout__OC == false){ _limitsUl.append('- '+WSAIO.checkout_message+'
'); }else{ _limitsUl.append('- '+WSAIO.checkout_message+'
'); _limitsUl.append('- Fulfill minimum order requirements to avail discount
'); } window.disable_checkout_MOQ = true; } } window.MOQ_alert = 'Order requirements not met.
'; multi_level_check(); function multi_level_check(){ if(selected_product_level_rules.length > 0){ var Total_qty = 0; var _qtyInc = 1; var _qtyMin = 0; var _qtyMax = 0; var _qtyDefault = 1; var group_value = []; $(selected_product_level_rules).each(function(e){ if(group_value.indexOf(selected_product_level_rules[e].mul_group) == -1){ group_value.push(selected_product_level_rules[e].mul_group) } }) $(group_value).each(function(ee){ Total_qty = 0; _errorMsg = ''; var cart__items = window.cart_data.items; cart__items.forEach(function(cart__item, i){ $(selected_product_level_rules).each(function(e){ if(selected_product_level_rules[e].variantId == cart__item.variant_id && selected_product_level_rules[e].mul_group == group_value[ee]){ Total_qty+=parseInt(cart__item.quantity); _qtyInc = parseInt(selected_product_level_rules[e].quantity_increment); _qtyMax = parseInt(selected_product_level_rules[e].maximum_quantity); _qtyDefault = parseInt(selected_product_level_rules[e].default_quantity); _qtyMin = parseInt(selected_product_level_rules[e].minimum_quantity); } }) }) if(Total_qty < _qtyMin ){ _errorMsg='Total Quantity cannot be less than '+_qtyMin; } if(Total_qty % _qtyInc !== 0){ _errorMsg='Total Quantity must be multiple of '+_qtyInc; } if(Total_qty > _qtyMax){ _errorMsg='Total Quantity cannot be more than '+_qtyMax; } if(_errorMsg != ''){ _limitsUl.append('- '+_errorMsg+'
'); window.disable_checkout_MOQ = true; } apply_codition() function apply_codition(){ if((WSAIO.checkout_message!='' && WSAIO.disable_checkout) || !WSAIO.checkout_requirements){ if(typeof WSAIO.checkout_message != 'undefined' && WSAIO.default_limit){ if(typeof WSAIO.allow_normal_checkout__OC == 'undefined' || WSAIO.allow_normal_checkout__OC == false){ _limitsUl.append('- '+WSAIO.checkout_message+'
'); }else{ _limitsUl.append('- '+WSAIO.checkout_message+'
'); _limitsUl.append('- Fulfill minimum order requirements to avail discount
'); } window.disable_checkout_MOQ = true; } } window.MOQ_alert = 'Order requirements not met.
'; } }) } if ("function" === typeof callback) { callback('done') } } if(WSAIO.run_checkout != undefined){ WSAIO.run_checkout(); } } } }) //============================for cart page function end========================================// ========================== Developers integeration function ================================ $(document).ready(function(){ setTimeout(function(){ if(WSAIO.template == 'product'){ // product on load function var varaint_inventory_management = ''; var varaint_inventory_policy = ''; var vid = $('[name="id"]').val(); if(vid != undefined){ var _index = default_product_variant.findIndex(function(e){return e.variant_id == vid }) if(_index > -1){ varaint_inventory_management = default_product_variant[_index].variant_inventory_management; varaint_inventory_policy = default_product_variant[_index].variant_inventory_policy; } setTimeout(function () { WSAIO.qtyControl({ template: 'product', product: current_product, productId: current_product.id, variantId:$('[name="id"]').val(), functionality: 'variant_level', add_to_cart:'[type="submit"].product-form__add-button.button.button--primary.button--full', varaint_inventory_management:varaint_inventory_management, // if not available then leave it empty varaint_inventory_policy:varaint_inventory_policy, // if not available then leave it empty parent_product_selector:'.product__info', removeableSelector_qty: '.product-form__quantity', removeableSelector_variants:'.product-form__variants' }) }, 1500); // product variant change function $('.block-swatch__item,.color-swatch-list').on('click',function(){ setTimeout(function () { WSAIO.qtyControl({ template: 'product', product: current_product, productId: current_product.id, variantId:$('[name="id"]').val(), functionality: 'variant_level', add_to_cart:'[type="submit"].product-form__add-button.button.button--primary.button--full', parent_product_selector:'.product__info', removeableSelector_qty: '.product-form__quantity', removeableSelector_variants:'.product-form__variants' }) }, 1500); }); } } // Quick view function var isQuickViewOpen = false; var _intv = setInterval(function () { if ($('.drawer--quick-buy[open]').length > 0 && isQuickViewOpen == false) { isQuickViewOpen = true; setTimeout(function () { var Vid=$('.drawer--quick-buy[open] [name="id"]').val();var handle = $('.drawer--quick-buy[open]').find('.product-item-meta__title').attr('href').split('/products/')[1].split('?')[0];console.log(handle,Vid) jQuery.getJSON('/products/'+handle+'.js', function(product) { $('.product--stacked').find('.price').addClass('wsaio_'+product.id) WSAIO.qtyControl({ template: 'product', product: product, productId: product.id, variantId: Vid, functionality: 'variant_level', add_to_cart:'[type="submit"].product-form__add-button.button.button--secondary.button--full', parent_product_selector:'.drawer--quick-buy[open]', removeableSelector_qty: '.product-form__quantity', removeableSelector_variants:'.product-form__option-selector' }) }) }, 500); //Quick Variant change $('.block-swatch__item,.color-swatch-list').on('click',function(){ setTimeout(function () { var Vid=$('.drawer--quick-buy[open] [name="id"]').val();var handle = $('.drawer--quick-buy[open]').find('.product-item-meta__title').attr('href').split('/products/')[1].split('?')[0];console.log(handle,Vid) jQuery.getJSON('/products/'+handle+'.js', function(product) { $('.product--stacked').find('.price').addClass('wsaio_'+product.id) WSAIO.qtyControl({ template: 'product', product: product, productId: product.id, variantId: Vid, functionality: 'variant_level', add_to_cart:'[type="submit"].product-form__add-button.button.button--secondary.button--full', parent_product_selector:'.drawer--quick-buy[open]', removeableSelector_qty: '.product-form__quantity', removeableSelector_variants:'.product-form__option-selector' }) }) }, 1500); }); } else if (!$('.drawer--quick-buy[open]').length > 0 && isQuickViewOpen == true) { isQuickViewOpen = false; } }, 500); $(WSAIO.collection_items_each_selector).each(function (index, item) { if (item.querySelector("a[href]") == null) { return false; } var handle = null; handle = item.querySelector("a[href]").getAttribute("href"); if (handle) { var product_handle = null, productIndex = -1; try { product_handle = handle.split('/products/')[1]; product_handle = product_handle.split('?')[0]; } catch (e) {} jQuery.getJSON("/products/" + product_handle+".js", function (product) { item.querySelector(WSAIO.collection_item_price_selector).classList.add('wsaio_'+product.id) WSAIO.qtyControl({ template: 'collection', product: product, productId: product.id, variantId:product.variants[0].id, functionality: 'variant_level', add_to_cart:'.form [name="add"]', varaint_inventory_management:'', // if not available then leave it empty varaint_inventory_policy:'', // if not available then leave it empty parent_product_selector:'.grid__item', removeableSelector_qty: '.product-form__quantity', removeableSelector_variants:'variant-radios' }) }) } }); },1500) }) window.addEventListener("load", function(){ setTimeout(function(){ if(typeof WSAIO != 'undefined'){ WSAIO.checkout_restriction = function(){ WSAIO.order_control(); WSAIO.cartQuantityControllers(); } WSAIO.load_checkout_restriction = function(){ WSAIO.order_control(); WSAIO.loadcartQuantityControllers(); } setTimeout(function(){ $('[name="updates[]"]').on('change',function(){ setTimeout(function(){ WSAIO.cartQuantityControllers(); },1000); }) },100); } },500) });