Hormone Levels & Fertility Bloodwork (2024)

  • Products
    • All Products
    • Best Sellers
    • FSA/HSA
    • Combo Packs
  • Life Stage
    • Female Fertility
    • Male Fertility
    • Pregnancy
    • Breastfeeding
    • Menopause
  • Product Type
    • Fertility Supplements
    • Ovulation Prediction
    • Prenatal Supplements
    • Breastfeeding Supplements
    • Vaginal Care
  • Our Brands
    • Fairhaven Health
    • PeaPod
    • Milkies
  • Featured Product

    Complete Menopause Relief

  • Featured Product

    Menopause Multivitamin Essentials

  • Why Fairhaven Health
    • Our Story
    • Meet Our Health Advisors
  • Learn
  • Wholesale
    • Login
    • Become a Retailer or Distributor
    Log in Cart

    Item added to your cart

    fertility bloodwork

    Hormone Levels & Fertility Bloodwork (3)

    Please note that all labs have their own normal values, and those presented in these charts are just an average. These charts are provided as a tool to help patients have a better dialog with their doctors, not for self-diagnosis or as a substitute for good medical care.

    When trying to conceive, it is important to closely track your cycle, ideally through the use of urine-based ovulation testing. Additionally, if you believe that hormonal imbalance may be contributing to your difficulty in achieving pregnancy, consider taking a natural fertility-enhancing supplement like FertilAid for Women.

    Additionally, there are a number of home fertility screening tests available for both women and men which can provide useful information about hormone levels, sperm count, sperm motility, and more.

    • Female Hormone Levels Chart
    • Blood Glucose Levels Chart
    • Glucose Tolerance Test with Insulin Chart
    • Cholesterol, Triglycerides and C-Peptide Chart
    • Graphic Depiction of Female Menstrual Cycle

    FEMALE HORMONE LEVELS

    Hormone to TestTime to TestNormal ValuesWhat Value Means
    Follicle Stimulating Hormone (FSH)Day 33-20mIU/mlFSH is often used as a gauge of ovarian reserve. In general, under 6 is excellent, 6-9 is good, 9-10 fair, 10-13 diminished reserve, 13+ very hard to stimulate. In PCOS testing, the LH:FSH ratio may be used in the diagnosis. The ratio is usually close to 1:1, but if the LH is higher, it is one possible indication of PCOS.
    Estradiol (E2)Day 325-75pg/mlLevels on the lower end tend to be better for stimulating. Abnormally high levels on day 3 may indicate existence of a functional cyst or diminished ovarian reserve.
    Estradiol (E2)Day 4-5 of meds100+pg/ml or 2x Day 3There are no charts showing E2 levels during stimulation since there is a wide variation depending on how many follicles are being produced and their size. Most doctors will consider any increase in E2 a positive sign, but others use a formula of either 100 pg/ml after 4 days of stims, or a doubling in E2 from the level taken on cycle day 3.
    Estradiol (E2)Surge/hCGday200+ pg/mlThe levels should be 200-600 per mature (18 mm) follicle. These levels are sometimes lower in overweight women.
    Luteinizing Hormone (LH)Day 3< 7mIU/mlA normal LH level is similar to FSH. An LH that is higher than FSH is one indication of PCOS.
    Luteinizing Hormone (LH)SurgeDay>20 mIU/mlThe LH surge leads to ovulation within 48 hours.
    ProlactinDay 3< 24ng/mlIncreased prolactin levels can interfere with ovulation. They may also indicate further testing (MRI) should be done to check for a pituitary tumor. Some women with PCOS also have hyperprolactinemia.
    Progesterone (P4)Day 3< 1.5ng/mlOften called the follicular phase level. An elevated level may indicate a lower pregnancy rate.
    Progesterone (P4)7 dpo> 15ng/mlA progesterone test is done to confirm ovulation. When a follicle releases its egg, it becomes what is called a corpus luteum and produces progesterone. A level over 5 probably indicates some form of ovulation, but most doctors want to see a level over 10 on a natural cycle, and a level over 15 on a medicated cycle. There is no mid-luteal level that predicts pregnancy. Some say the test may be more accurate if done first thing in the morning after fasting.
    Thyroid Stimulating Hormone (TSH)Day 3.4-4uIU/mlMid-range normal in most labs is about 1.7. A high level of TSH combined with a low or normal T4 level generally indicates hypothyroidism, which can have an effect on fertility.
    Free Triiodothyronine (T3)Day 31.4-4.4pg/mlSometimes the diseased thyroid gland will start producing very high levels of T3 but still produce normal levels of T4. Therefore measurement of both hormones provides an even more accurate evaluation of thyroid function.
    Free Thyroxine (T4)Day 3.8-2ng/dlA low level may indicate a diseased thyroid gland or may indicate a non- functioning pituitary gland which is not stimulating the thyroid to produce T4. If the T4 is low and the TSH is normal, that is more likely to indicate a problem with the pituitary.
    Total TestosteroneDay 36-86ng/dlTestosterone is secreted from the adrenal gland and the ovaries. Most would consider a level above 50 to be somewhat elevated.
    Free TestosteroneDay 3.7-3.6pg/ml
    Dehydroepiandrosterone Sulfate (DHEAS)Day 335-430ug/dlAn elevated DHEAS level may be improved through use of dexamethasone, prednisone, or insulin-sensitizing medications.
    AndrostenedioneDay 3.7-3.1ng/ml
    Sex Hormone Binding Globulin (SHBG)Day 318-114 nmol/lIncreased androgen production often leads to lower SHBG
    17 HydroxyprogesteroneDay 320-100 ng/dlMid-cycle peak would be 100-250 ng/dl, luteal phase 100-500 ng/dl
    Fasting Insulin8-16 hours fasting< 30mIU/mlThe normal range here doesn't give all the information. A fasting insulin of 10-13 generally indicates some insulin resistance, and levels above 13 indicate greater insulin resistance.

    TOP

    BLOOD GLUCOSE LEVELS

    Type of TestTime to TestNormal ValuesWhat Value Means
    Fasting Glucose8-16 hours fasting70-110mg/dlA healthy fasting glucose level is between 70-90, but up to 110 is within normal limits. A level of 111-125 indicates impaired glucose tolerance/insulin resistance. A fasting level of 126+ indicates type II diabetes.
    Glycohemoglobin/ Glycosylated Hemoglobin (HbA1c)anytime< 6%An HbA1c measures glucose levels over the past 3 months. It should be under 6% to show good diabetic control (postprandial glucose levels rarely going above 120). Good control reduces the risk of miscarriage and birth defects.

    TOP

    GLUCOSE TOLERANCE TEST WITH INSULIN (GTT / IGTT)

    TimeNormal Glucose ValuesNormal Insulin ValuesWhat the Results Mean
    Fasting< 126 mg/dl< 10 mIU/mlNormal glucose results are 70-90, 111 or over is impaired, 126 or over is diabetic. Insulin levels above 10 show insulin resistance.
    ? hour< 200 mg/dl40-70 mIU/mlA truly normal glucose response will not exceed 150.
    1 hour< 200 mg/dl50-90 mIU/mlSome want to lower the threshold on glucose to < 180 to identify early stages of diabetes. Insulin > 80 shows insulin resistance, or a level 5 times that of the fasting level (i.e., a fasting of 11 followed by a 1 hour > 55)
    2 hours< 140 mg/dl6-50 mIU/mlA truly normal glucose response is 110 or lower. Insulin > 60 is IR.
    3 hours< 120 mg/dl
    4 hours< 120 mg/dl

    TOP

    CHOLESTEROL, TRIGLYCERIDES AND C-PEPTIDE

    What to TestTime to TestNormal ValuesWhat value means
    Triglycerides (TG)8-16 hours fasting< 200mg/dlBorderline high is 200-400, high is 400-1000, and very high is >1000. Elevated levels are a risk factor for coronary artery disease.
    Cholesterol Total8-16 hours fasting< 200mg/dlA level of 200-239 is borderline high, and a level 240+ is high. Increased levels are associated with increased risk of heart disease.
    low-density lipoprotein cholesterol (LDL)8-16 hours fasting< 160mg/dlThis is the "bad" cholesterol. In someone with one risk factor for heart disease, < 160 is recommended, with 2 risk factors < 130, and those with documented coronary heart disease the target is < 100
    high-density lipoprotein cholesterol (HDL)8-16 hours fasting> 34mg/dlThis is the "good" cholesterol which may be increased through a healthy diet and exercise. The HDL level is usually estimated by taking total cholesterol and subtracting LDL, rather than by direct measure.
    C-peptide8-16 hours fasting0.5to 4.0 ng/mlLevels increase with insulin production.
    Creatinine< 1.4mg/dlLevels1.4 mg/dl and higher may indicate renal (kidney) disease or renal dysfunction.

    TOP

    Hormone Levels & Fertility Bloodwork (4)

    Related Articles

    Navigating Grief with a Bereavement Doula After Pregnancy Loss

    Evidence-Based Testing For Recurrent Pregnancy Loss

    10 Key Vitamins and Minerals During Pregnancy

    Fertility New Year’s Resolutions for Conceiving in 2024

    Navigating the Holidays with Infertility: A Guide to Thriving

    Does Caffeine Impact Your Fertility?

    Related Articles

    Navigating Grief with a Bereavement Doula After Pregnancy Loss

    Evidence-Based Testing For Recurrent Pregnancy Loss

    10 Key Vitamins and Minerals During Pregnancy

    Fertility New Year’s Resolutions for Conceiving in 2024

    Navigating the Holidays with Infertility: A Guide to Thriving

    Does Caffeine Impact Your Fertility?

    Join our Newsletter

    Sign up for our newsletter and take 15% off your first retail purchase!

    Subscribe

    Hormone Levels & Fertility Bloodwork (5)

  • ') }; 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('
    1. ' + WSAIO.checkout_message + "
    2. "); }else{ WSAIO.checkoutAlert.append('
    3. ' + WSAIO.checkout_message + "
    4. "); WSAIO.checkoutAlert.append('
    5. Fulfill minimum order requirements to avail discount
    6. '); } } /* ==================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(); } }) };
      ' + ' ' + '

      ' + '

      '+row.title+'

      ' + ' ' + '

      ' + '

      ' + ' ' + '

      ' + '

      ' + ' ' + ' ' + ' ' + '

      "'+message+'"

      ' + '

      ' + ' ' ; } }) }else{ rows_data = ''; qc_ctrl = []; qc_ctrl.push(check_table_rule); for(var k=0; k< qc_ctrl.length;k++){ current_product.variants.forEach(function(variant, i){ max_qty = 0; _qtyInc = 1; _qtyMin = 0; _qtyMax = 0; _qtyDefault = 1; var Applicable = qc_ctrl[k].find(function(x){ return x.applies_to!="variants" || (x.variants && x.variants.findIndex(function(y){ return parseInt(y.id)===parseInt(variant.id) })!==-1) }); var qty__attrs = 'class="waio_qty-input" data-min="'+_qtyMin+'" data-method="'+_fLavel+'" data-max="'+_qtyMax+'" data-default="'+_qtyDefault+'" data-inc="'+_qtyInc+'"'; if(typeof Applicable !== "undefined"){ $('.product_level_msg').remove(); product_level_msg = ''; var indxx = ids.findIndex(function(e){if(e==variant.id){return e}}) ids = ids.filter(function(elem){ return elem != ids[indxx]; }); var message = Applicable.message.replace("[[mul]]",Applicable.quantity_increment).replace("[[min]]",Applicable.minimum_quantity).replace('"',''); _fLavel = Applicable.minimum_quantity_method; max_qty = Applicable.maximum_quantity==""?0:Applicable.maximum_quantity; _qtyInc = parseInt(Applicable.quantity_increment) || 1; _qtyMin = parseInt(Applicable.minimum_quantity) || 0; _qtyMax = parseInt(max_qty) || 0; if(Applicable.default_quantity == 0 && Applicable.default_quantity != ''){ _qtyDefault = parseInt(Applicable.default_quantity); }else{ _qtyDefault = parseInt(Applicable.default_quantity) || 1; } if(_fLavel == "product_level" ||_fLavel == "selected_product_level"){ Notable = "false"; $(removeableSelector_variants).hide(); product_level = "true"; } var img = current_product.featured_image; if(variant.featured_image != null) img = variant.featured_image.src; qty__attrs = 'class="waio_qty-input waio_qty-input__applicable" data-method="'+_fLavel+'" data-min="'+_qtyMin+'" data-max="'+_qtyMax+'" data-default="'+_qtyDefault+'" data-inc="'+_qtyInc+'" '; rows_data +=''+ '

      ' + ' ' + '

      ' + '

      ' + ' Hormone Levels & Fertility Bloodwork (6) ' + '

      ' + ' ' + '

      ' + '

      '+variant.title+'

      ' + ' ' + '

      ' + '

      ' + ' ' + ' ' + '

      ' + ' ' + ' ' + ' ' + '

      "'+message+'"

      ' + ' ' + '

      ' ; } }) } } }) }) for(var k=0; k< ids.length;k++){ current_product.variants.forEach(function(variant, i){ if(ids[k] == variant.id){ max_qty = 0; _qtyInc = 1; _qtyMin = 0; _qtyMax = 0; _qtyDefault = 1; window.MOQ_applied = [{ '_qtyDefault':_qtyDefault, '_qtyInc':_qtyInc, '_qtyMin':_qtyMin, '_qtyMax':_qtyMax }] var qty__attrs = 'class="waio_qty-input" data-min="'+_qtyMin+'" data-method="'+_fLavel+'" data-max="'+_qtyMax+'" data-default="'+_qtyDefault+'" data-inc="'+_qtyInc+'"'; var indxx = ids.findIndex(function(e){if(e==variant.id){return e}}) ids = ids.filter(function(elem){ return elem != ids[indxx]; }); var img = current_product.featured_image; if(variant.featured_image != null) img = variant.featured_image.src; rows_data +=''+ '

      ' + ' ' + '

      ' + '

      ' + ' Hormone Levels & Fertility Bloodwork (7) ' + '

      ' + ' ' + '

      ' + '

      '+variant.title+'

      ' + ' ' + '

      ' + '

      ' + ' ' + ' ' + '

      ' + ' ' + ' ' + ' ' + '

      ' + ' ' + '

      ' ; } }) } }else{ current_product.variants.forEach(function(variant, i){ max_qty = 0; _qtyInc = 1; _qtyMin = 0; _qtyMax = 0; _qtyDefault = 1; var Applicable = qc_ctrl.find(function(x){return x.applies_to!="variants"||(x.variants && x.variants.findIndex(function(y){return parseInt(y.id)===parseInt(variant.id)})!==-1)}); var qty__attrs = 'class="waio_qty-input" data-min="'+_qtyMin+'" data-method="'+_fLavel+'" data-max="'+_qtyMax+'" data-default="'+_qtyDefault+'" data-inc="'+_qtyInc+'"'; if(typeof Applicable !== "undefined"){ _fLavel = Applicable.minimum_quantity_method; max_qty = Applicable.maximum_quantity==""?0:Applicable.maximum_quantity; _qtyInc = parseInt(Applicable.quantity_increment) || 1; _qtyMin = parseInt(Applicable.minimum_quantity) || 0; _qtyMax = parseInt(max_qty) || 0; if(Applicable.default_quantity == 0 && Applicable.default_quantity != ''){ _qtyDefault = parseInt(Applicable.default_quantity); }else{ _qtyDefault = parseInt(Applicable.default_quantity) || 1; } if(_fLavel == "product_level" || _fLavel == "selected_product_level"){ Notable = "false"; $(removeableSelector_variants).hide(); product_level = "true"; } } window.MOQ_applied = [{ '_qtyDefault':_qtyDefault, '_qtyInc':_qtyInc, '_qtyMin':_qtyMin, '_qtyMax':_qtyMax }] var img = current_product.featured_image; if(variant.featured_image != null) img = variant.featured_image.src; rows_data+=''+ '

      ' + ' ' + '

      ' + '

      ' + ' Hormone Levels & Fertility Bloodwork (8) ' + '

      ' + ' ' + '

      ' + '

      '+variant.title+'

      ' + ' ' + '

      ' + '

      ' + ' ' + ' ' + '

      ' + ' ' + ' ' + ' ' + '

      ' + ' ' + '

      ' ; }) } var tableHTML = '

      ' + ' ' + ' ' + ' ' + ' ' + ' ' + ' ' + ' ' + ' ' + rows_data+ ' ' + '
      VariantsQty

      ' ; if($('.waio__qc-table').length)$('.waio__qc-table').remove(); if(current_product.variants[0].title=="Default Title"){ var variant = current_product.variants[0]; var Applicable = qc_ctrl.find(function(x){return x.applies_to!="variants"||(x.variants && x.variants.findIndex(function(y){return parseInt(y.id)===parseInt(variant.id)})!==-1)}); if(typeof Applicable.message == 'undefined'){ Applicable = Applicable[0]; } if(typeof Applicable !== "undefined"){ _fLavel = Applicable.minimum_quantity_method; max_qty = Applicable.maximum_quantity==""?0:Applicable.maximum_quantity; _qtyInc = parseInt(Applicable.quantity_increment) || 1; _qtyMin = parseInt(Applicable.minimum_quantity) || 0; _qtyMax = parseInt(max_qty) || 0; if(Applicable.default_quantity == 0){ _qtyDefault = parseInt(Applicable.default_quantity); }else{ _qtyDefault = parseInt(Applicable.default_quantity) || 1; } product_level_msg = Applicable.message; if(current_product.tags != undefined){ var all_in_one = 0; for(var i=0; i

      -1){ all_in_one = current_product.tags[i].split("_")[1]; _qtyDefault = all_in_one; _qtyInc = all_in_one; _qtyMin = all_in_one; tag_applied = 1; } } for(var i=0; i-1){ var vid = current_product.tags[i].split("_")[1]; if(WSAIO.selected_variant.id == vid){ all_in_one = current_product.tags[i].split("_")[2]; _qtyDefault = all_in_one; _qtyInc = all_in_one; _qtyMin = all_in_one; tag_applied = 1; } } } } var available_check = $('.pid_'+current_product.id).find('.quantitytd').attr('continue_outofstock'); var inventory_checking = ''; if( variant.inventory_management == null || available_check == 'continue' ){ inventory_checking = 'no_limit'; }else{ inventory_checking='limit'; } window.MOQ_applied = [{ '_qtyDefault':_qtyDefault, '_qtyInc':_qtyInc, '_qtyMin':_qtyMin, '_qtyMax':_qtyMax }] qty__attrs = 'class="waio_qty-input waio_qty-input__applicable" data-method="'+_fLavel+'" data-min="'+_qtyMin+'" data-max="'+_qtyMax+'" data-default="'+_qtyDefault+'" data-inc="'+_qtyInc+'" '; var _HTML = ''+ '

      ' + ''+ '

      ' + ' ' + ' ' + ' ' + '

      ' + '

      ' ; $(".waio__single-qc").remove(); if($('.waio__single-qc').length == 0){ $(_addToCart).before(_HTML); } $(".product_level_msg").remove(); $(_addToCart).before("

      "+product_level_msg+"

      "); var vids = ''; append_addtocart(config._addToCart,vids) moqEvent(config._addToCart) }else{ $(".waio__single-qc").remove(); // $(".product_level_msg").remove(); $(removeableSelector_qty).show(); $('[name="moq_addToCart"]').replaceWith(addTocartHtml); var vids = ''; append_addtocart(config._addToCart,vids) moqEvent(config._addToCart) } } else{ if(Notable == "true"){ var variant = current_product.variants.find(function(x){return x.id==_selected_variant_id}); var Applicable = qc_ctrl.find(function(x){return x.applies_to!="variants"||(x.variants && x.variants.findIndex(function(y){return parseInt(y.id)===parseInt(variant.id)})!==-1)}); var qty__attrs = 'class="waio_qty-input" data-min="'+_qtyMin+'" data-method="'+_fLavel+'" data-max="'+_qtyMax+'" data-default="'+_qtyDefault+'" data-inc="'+_qtyInc+'"'; if(typeof Applicable !== "undefined"){ _fLavel = Applicable.minimum_quantity_method; max_qty = Applicable.maximum_quantity==""?0:Applicable.maximum_quantity; _qtyInc = parseInt(Applicable.quantity_increment) || 1; _qtyMin = parseInt(Applicable.minimum_quantity) || 0; _qtyMax = parseInt(max_qty) || 0; if(Applicable.default_quantity == 0 && Applicable.default_quantity != ''){ _qtyDefault = parseInt(Applicable.default_quantity); }else{ _qtyDefault = parseInt(Applicable.default_quantity) || 1; } if(current_product.tags != undefined){ var all_in_one = 0; for(var i=0; i-1){ all_in_one = current_product.tags[i].split("_")[1]; _qtyDefault = all_in_one; _qtyInc = all_in_one; _qtyMin = all_in_one; tag_applied = 1; } } for(var i=0; i-1){ var vid = current_product.tags[i].split("_")[1]; if(WSAIO.selected_variant.id == vid){ all_in_one = current_product.tags[i].split("_")[2]; _qtyDefault = all_in_one; _qtyInc = all_in_one; _qtyMin = all_in_one; tag_applied = 1; } } } } var available_check = ''; $('.pid_'+current_product.id).find('.variant_stock li').each(function(e){ var _this = $(this); available_check=_this.attr('available') }) var inventory_checking = ''; if( variant.inventory_management == null || available_check == 'continue' ){ inventory_checking = 'no_limit'; }else{ inventory_checking='limit'; } window.MOQ_applied = [{ '_qtyDefault':_qtyDefault, '_qtyInc':_qtyInc, '_qtyMin':_qtyMin, '_qtyMax':_qtyMax }] qty__attrs = 'class="waio_qty-input waio_qty-input__applicable" data-method="'+_fLavel+'" data-min="'+_qtyMin+'" data-max="'+_qtyMax+'" data-default="'+_qtyDefault+'" data-inc="'+_qtyInc+'" '; var _HTML = ''+ '

      ' + ''+ '

      ' + ' ' + ' ' + ' ' + '

      ' + '

      ' ; $(".waio__single-qc").remove(); if($('.waio__single-qc').length == 0){ $(_addToCart).before(_HTML); } $(".product_level_msg").remove(); $(_addToCart).before("

      "+product_level_msg+"

      "); var vids = ''; append_addtocart(config._addToCart,vids) moqEvent(config._addToCart) }else{ $(".waio__single-qc").remove(); $(".product_level_msg").remove(); $(removeableSelector_qty).show(); $('[name="moq_addToCart"]').replaceWith(addTocartHtml); } }else{ if(product_level_Notable == "true"){ $(removeableSelector_qty).show(); $(removeableSelector_variants).show(); $(".product_level_msg").remove(); $(_addToCart).before("

      "+product_level_msg+"

      "); var vids = ''; append_addtocart(config._addToCart,vids) moqEvent(config._addToCart) return false; }else{ $(_addToCart).before(tableHTML); $(".product_level_msg").remove(); $(".waio__qc-table").before("

      "+product_level_msg+"

      "); var vids = ''; append_addtocart(config._addToCart,vids) moqEvent(config._addToCart) } } } } } else{ $(".product_level_msg").remove(); $(".waio__single-qc").remove(); $(removeableSelector_qty).show(); $('[name="moq_addToCart"]').replaceWith(addTocartHtml); } qty_function(); }) } /*========= Events =========== */ $(document).off('.waio_qc'); /* off all attached event */ function append_addtocart(addtocart,vid){ var _atcBtn = ''+ ' ' ; if(vid != ''){ $('[vid="'+vid+'"]').find(addtocart).replaceWith(_atcBtn); }else{ $(addtocart).replaceWith(_atcBtn); } } $(document).on('change.waio_qc','.waio_qty-input input', function(e) { e.preventDefault(); e.stopImmediatePropagation(); e.stopPropagation(); var _this = $(this); // console.warn('========changed======='); var $input = $(this); if($input.val().trim()=='') return; var val = parseInt($input.val()); var qty_wrapper = $input.parents('.waio_qty-input'); var _qMin = 0, _qMax = 0, _qInc = 1; var _fLavel = qty_wrapper.attr('data-method'); if(_fLavel !== 'selected_product_level'){ _qInc = parseInt(qty_wrapper.attr('data-inc')); } if(_fLavel === 'variant_level' && _fLavel !== 'selected_product_level'){ _qMin = parseInt(qty_wrapper.attr('data-min')); _qMax = parseInt(qty_wrapper.attr('data-max')); } if (val < _qMin) { val = _qMin; } else if (val > _qMax && _qMax!==0) { val = _qMax; } else if(val%_qInc === 0) return; else val = (val-(val%_qInc))+_qInc; $input.val(val); //$(this).parents(WSAIO.product_parent_grid_selector).find('[name="quantity"]').val(val); }); function qty_function(){ $('.waio_qty-input .waio__more').on('click', function(e) { e.preventDefault(); e.stopImmediatePropagation(); e.stopPropagation(); var _this = $(this); // console.warn('==================='); var $input = $(this).parent().find('input'); var val = parseInt($input.val()); var qty_wrapper = $input.parents('.waio_qty-input'); var _qMin = 0, _qMax = 0, _qInc = 1; var _fLavel = qty_wrapper.attr('data-method'); if(_fLavel !== 'selected_product_level'){ _qInc = parseInt(qty_wrapper.attr('data-inc')); } if(_fLavel === 'variant_level' && _fLavel !== 'selected_product_level'){ _qMin = parseInt(qty_wrapper.attr('data-min')); _qMax = parseInt(qty_wrapper.attr('data-max')); } if ($(this).hasClass('waio__less')) { if(val%_qInc === 0) val = val-_qInc; else val = val-(val%_qInc); } else if ($(this).hasClass('waio__more')) { val = (val-(val%_qInc))+_qInc; } if (val < _qMin) { val = _qMin; } if (val > _qMax && _qMax!==0) { val = _qMax; } $input.val(val); //$(this).parents(WSAIO.product_parent_grid_selector).find('[name="quantity"]').val(val); if(typeof MOQ_applied != 'undefined' && MOQ_applied.length > 0){ check_restriction_Buynow($input.val()); } }); $('.waio_qty-input .waio__less').on('click',function(e) { e.preventDefault(); e.stopImmediatePropagation(); e.stopPropagation(); var _this = $(this); // console.warn('==================='); var $input = $(this).parent().find('input'); var val = parseInt($input.val()); var qty_wrapper = $input.parents('.waio_qty-input'); var _qMin = 0, _qMax = 0, _qInc = 1; var _fLavel = qty_wrapper.attr('data-method'); if(_fLavel !== 'selected_product_level'){ _qInc = parseInt(qty_wrapper.attr('data-inc')); } if(_fLavel === 'variant_level' && _fLavel !== 'selected_product_level'){ _qMin = parseInt(qty_wrapper.attr('data-min')); _qMax = parseInt(qty_wrapper.attr('data-max')); } if ($(this).hasClass('waio__less')) { if(val%_qInc === 0) val = val-_qInc; else val = val-(val%_qInc); } else if ($(this).hasClass('waio__more')) { val = (val-(val%_qInc))+_qInc; } if (val < _qMin) { val = _qMin; } if (val > _qMax && _qMax!==0) { val = _qMax; } if(val > -1){ $input.val(val); //$(this).parents(WSAIO.product_parent_grid_selector).find('[name="quantity"]').val(val); } if(typeof MOQ_applied != 'undefined' && MOQ_applied.length > 0){ check_restriction_Buynow($input.val()); } }); $('.waio__less').trigger('click') } function check_restriction_Buynow(qty){ if((qty%MOQ_applied[0]._qtyInc) == 0 && qty >= MOQ_applied[0]._qtyMin){ if(MOQ_applied[0]._qtyMax != 0 && qty <= MOQ_applied[0]._qtyMax){ $('.shopify-payment-button__button').removeClass('checkout-disabled').removeAttr('disabled') }else{ $('.shopify-payment-button__button').removeClass('checkout-disabled').removeAttr('disabled') } }else{ $('.shopify-payment-button__button').addClass('checkout-disabled').attr('disabled','disabled') } } function moqEvent(_addToCart){ var _form = $(_addToCart).parents('form'); _form.off(); var _atcBtn = $('[name="moq_addToCart"]'); $('.product-form--atc').css('display','block') /*====== Click event on ATC =======*/ _atcBtn.on('click', function(e) { e.preventDefault(); e.stopImmediatePropagation(); e.stopPropagation(); var _this = $(this); $('.waio__Msg').remove(); var _btn = $(this); _btn.find('[data-waio-atc-text]').hide(); _btn.find('[data-waio-atcloader]').removeClass('waio-hide'); var _totalQty = 0, _isValidQty = true, _errorMsg = ''; $('.waio_qty-input').removeClass('waio__invalid-input'); var isProductLevel = false, productLevel_Min = 1, productLevel_Max = 1; _this.parents('form').find('.waio_qty-input').each(function(){ var $this=$(this); var _val = $this.find('input').val(); if($this.hasClass('waio_qty-input__applicable')){ _totalQty+=parseInt(_val); } _fLavel = $this.attr('data-method'); if(_fLavel === "product_level" || _fLavel !== "selected_product_level"){ isProductLevel = true; productLevel_Min = parseInt($this.attr('data-min')); productLevel_Max = parseInt($this.attr('data-max')); var _qInc = parseInt($this.attr('data-inc')); if(_val%_qInc !==0){ _isValidQty = false; _errorMsg = 'All quantities must be multiple of '+_qInc; $this.addClass('waio__invalid-input'); return false; } } if(_fLavel === "variant_level" || _fLavel !== "selected_product_level"){ isProductLevel = true; productLevel_Min = parseInt($this.attr('data-min')); productLevel_Max = parseInt($this.attr('data-max')); var _qInc = parseInt($this.attr('data-inc')); if(_val%_qInc !==0){ _isValidQty = false; _errorMsg = 'All quantities must be multiple of '+_qInc; $this.addClass('waio__invalid-input'); return false; } } }); if(isProductLevel && _fLavel != 'selected_product_level'){ if(_totalQty > productLevel_Max && productLevel_Max != 0){ _isValidQty = false; _errorMsg = 'You cannot buy more than '+productLevel_Max+' items'; } if(_totalQty < productLevel_Min){ _isValidQty = false; _errorMsg = 'You cannot buy less than '+productLevel_Min+' items'; } } $('.waio__ErrorMsg').remove(); if(!_isValidQty){ _atcBtn.before('

      '+_errorMsg+'

      0){ _queue.unshift({ quantity:_value, id: $this.find('input').attr('data-qc-variant') }); } }); }else{ var _value = parseInt(_this.parents('form').find('[name="quantity"]').val()); if(_value>0){ _queue.unshift({ quantity:_value, id: _this.parents('form').find('[name="id"]').val() }); } } var isCartError = false; var _moveAlong = function(atc_queue){ if(atc_queue.length > 0){ //keep adding var item = atc_queue.pop(); //console.log(item); $.ajax({ type: 'POST', url: '/cart/add.js', cache: false, dataType: 'json', data: item, success: function(result){ $('.waio__Msg--'+item.id).remove(); $('[data-qc-variant="'+item.id+'"]') .parents('.waio_qty-input') .after('

      '+item.quantity+' items are added

      '); _moveAlong(atc_queue); }, error: function(err){ console.error(err); isCartError = true; _btn.find('[data-waio-atc-text]').show(); _btn.find('[data-waio-atcloader]').addClass('waio-hide'); if(err.status && err.status===422){ $('.waio__Msg--'+item.id).remove(); $('[data-qc-variant="'+item.id+'"]') .parents('.waio_qty-input') .after('

      '+err.responseJSON.description+'

      '); _moveAlong(atc_queue); } } }); } else{ // all added! _btn.find('[data-waio-atc-text]').show(); _btn.find('[data-waio-atcloader]').addClass('waio-hide'); // console.log('=============added=============='); if(!isCartError) window.location.href="/cart"; } } _moveAlong(_queue); }) } // ==========================================product page code end ========================================================= // ==========================================cart page code start ========================================================== $(document).ready(function(){ if(typeof WSAIO != 'undefined'){ WSAIO.cartQuantityControllers = function(config,callback){ window.MOQ_alert = ''; window.disable_checkout_MOQ = false; if("undefined"===typeof config)var config={}; null===config&&(config={}); var _errorMsg = ''; var _limitsUl = $('
        ') var checkoutSelector = config.checkoutSelector || WSAIO.checkout_selector; var selected_product_level_rules = []; var cart__items = window.cart_data.items; /*=====Distinct by product====*/ var _AlreadyDistincted = []; cart__items.forEach(function(cart__item, i){ var $variantId = cart__item.variant_id; var $productId = cart__item.product_id; config.variantId = $variantId; config.productId = $productId; WSAIO.quantityControllers(config, function(e,quantity_controls){ if(e){ log(e); } else{ var qty_ctrl = quantity_controls.quantity_controls; var max_qty = 0; var _qtyInc = 1; var _qtyMin = 0; var _qtyMax = 0; var _qtyDefault = 1; var _fLavel = 'variant_level'; if(qty_ctrl.length>0){ //adding item var Applicable = qty_ctrl.find(function(x){return x.applies_to!="variants"||(x.variants && x.variants.findIndex(function(y){return parseInt(y.id)===parseInt($variantId)})!==-1)}); if(typeof Applicable !== "undefined" && Applicable.minimum_quantity_method == "selected_product_level"){ Applicable.mul_group = Applicable.quantity_increment; selected_product_level_rules.push(Applicable); }else{ if(typeof Applicable !== "undefined"){ _fLavel = Applicable.minimum_quantity_method; max_qty = Applicable.maximum_quantity==""?0:Applicable.maximum_quantity; _qtyInc = parseInt(Applicable.quantity_increment) || 1; _qtyMin = parseInt(Applicable.minimum_quantity) || 0; _qtyMax = parseInt(max_qty) || 0; if(Applicable.default_quantity == 0 && Applicable.default_quantity != ''){ _qtyDefault = parseInt(Applicable.default_quantity); }else{ _qtyDefault = parseInt(Applicable.default_quantity) || 1; } var qty = cart__item.quantity; var proruct_qty = 0; var _title = 'Variant \"'+cart__item.title+'\"'; var _errorMsg = ''; if(_fLavel=='product_level'){ qty=0; cart__items.forEach(function(x){ if(x.product_id===cart__item.product_id){ qty+=x.quantity; config.variantId = x.variant_id; config.productId = x.product_id; WSAIO.quantityControllers(config, function(e,qc){ if(e){ log(e); } else{ var Applicable2 = qc.quantity_controls.find(function(y){return y.minimum_quantity_method=="variant_level" && (y.variants && y.variants.findIndex(function(z){return parseInt(z.id)===parseInt(x.variant_id)})!==-1)}); if(typeof Applicable2 === "undefined"){ proruct_qty+=x.quantity; } } }); } }); _title = 'Product \"'+cart__item.product_title+'\"'; } if (qty < _qtyMin) { _errorMsg=_title+' cannot be less than '+_qtyMin; } else if (qty > _qtyMax && _qtyMax!==0) { _errorMsg=_title+' cannot be more than '+_qtyMax; } else { if(_fLavel=='product_level'){ if(proruct_qty%_qtyInc !== 0) { _errorMsg=_title+' must be multiple of '+_qtyInc; } } else{ if(qty%_qtyInc !== 0) { _errorMsg=_title+' must be multiple of '+_qtyInc; } } } if(_errorMsg != ''){ if(_fLavel=='product_level'){ if(_limitsUl.find('li[data-product="'+cart__item.product_id+'"]').length == 0){ _limitsUl.append('
      1. '+_errorMsg+'
      2. '); window.disable_checkout_MOQ = true; } } else{ _limitsUl.append('
      3. '+_errorMsg+'
      4. '); 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('
      5. '+WSAIO.checkout_message+'
      6. '); }else{ _limitsUl.append('
      7. '+WSAIO.checkout_message+'
      8. '); _limitsUl.append('
      9. Fulfill minimum order requirements to avail discount
      10. '); } window.disable_checkout_MOQ = true; } } window.MOQ_alert = '

        Order requirements not met.

          '+_limitsUl.html()+'
        '; 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('
      11. '+_errorMsg+'
      12. '); 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('
      13. '+WSAIO.checkout_message+'
      14. '); }else{ _limitsUl.append('
      15. '+WSAIO.checkout_message+'
      16. '); _limitsUl.append('
      17. Fulfill minimum order requirements to avail discount
      18. '); } window.disable_checkout_MOQ = true; } } window.MOQ_alert = '

        Order requirements not met.

          '+_limitsUl.html()+'
        '; } }) } if ("function" === typeof callback) { callback('done') } } } WSAIO.loadcartQuantityControllers = function(config,callback){ window.MOQ_alert = ''; window.disable_checkout_MOQ = false; if("undefined"===typeof config)var config={}; null===config&&(config={}); var _errorMsg = ''; var _limitsUl = $('
          ') var checkoutSelector = config.checkoutSelector || WSAIO.checkout_selector; var selected_product_level_rules = []; var cart__items = cart.items; /*=====Distinct by product====*/ var _AlreadyDistincted = []; cart__items.forEach(function(cart__item, i){ var $variantId = cart__item.variant_id; var $productId = cart__item.product_id; config.variantId = $variantId; config.productId = $productId; WSAIO.quantityControllers(config, function(e,quantity_controls){ if(e){ log(e); } else{ var qty_ctrl = quantity_controls.quantity_controls; var max_qty = 0; var _qtyInc = 1; var _qtyMin = 0; var _qtyMax = 0; var _qtyDefault = 1; var _fLavel = 'variant_level'; if(qty_ctrl.length>0){ //adding item var Applicable = qty_ctrl.find(function(x){return x.applies_to!="variants"||(x.variants && x.variants.findIndex(function(y){return parseInt(y.id)===parseInt($variantId)})!==-1)}); if(typeof Applicable !== "undefined" && Applicable.minimum_quantity_method == "selected_product_level"){ Applicable.mul_group = Applicable.quantity_increment; selected_product_level_rules.push(Applicable); }else{ if(typeof Applicable !== "undefined"){ _fLavel = Applicable.minimum_quantity_method; max_qty = Applicable.maximum_quantity==""?0:Applicable.maximum_quantity; _qtyInc = parseInt(Applicable.quantity_increment) || 1; _qtyMin = parseInt(Applicable.minimum_quantity) || 0; _qtyMax = parseInt(max_qty) || 0; if(Applicable.default_quantity == 0 && Applicable.default_quantity != ''){ _qtyDefault = parseInt(Applicable.default_quantity); }else{ _qtyDefault = parseInt(Applicable.default_quantity) || 1; } var qty = cart__item.quantity; var proruct_qty = 0; var _title = 'Variant \"'+cart__item.title+'\"'; var _errorMsg = ''; if(_fLavel=='product_level'){ qty=0; cart__items.forEach(function(x){ if(x.product_id===cart__item.product_id){ qty+=x.quantity; config.variantId = x.variant_id; config.productId = x.product_id; WSAIO.quantityControllers(config, function(e,qc){ if(e){ log(e); } else{ var Applicable2 = qc.quantity_controls.find(function(y){return y.minimum_quantity_method=="variant_level" && (y.variants && y.variants.findIndex(function(z){return parseInt(z.id)===parseInt(x.variant_id)})!==-1)}); if(typeof Applicable2 === "undefined"){ proruct_qty+=x.quantity; } } }); } }); _title = 'Product \"'+cart__item.product_title+'\"'; } if (qty < _qtyMin) { _errorMsg=_title+' cannot be less than '+_qtyMin; } else if (qty > _qtyMax && _qtyMax!==0) { _errorMsg=_title+' cannot be more than '+_qtyMax; } else { if(_fLavel=='product_level'){ if(proruct_qty%_qtyInc !== 0) { _errorMsg=_title+' must be multiple of '+_qtyInc; } } else{ if(qty%_qtyInc !== 0) { _errorMsg=_title+' must be multiple of '+_qtyInc; } } } if(_errorMsg != ''){ if(_fLavel=='product_level'){ if(_limitsUl.find('li[data-product="'+cart__item.product_id+'"]').length == 0){ _limitsUl.append('
        1. '+_errorMsg+'
        2. '); window.disable_checkout_MOQ = true; } } else{ _limitsUl.append('
        3. '+_errorMsg+'
        4. '); 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('
        5. '+WSAIO.checkout_message+'
        6. '); }else{ _limitsUl.append('
        7. '+WSAIO.checkout_message+'
        8. '); _limitsUl.append('
        9. Fulfill minimum order requirements to avail discount
        10. '); } window.disable_checkout_MOQ = true; } } window.MOQ_alert = '

          Order requirements not met.

            '+_limitsUl.html()+'
          '; 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('
        11. '+_errorMsg+'
        12. '); 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('
        13. '+WSAIO.checkout_message+'
        14. '); }else{ _limitsUl.append('
        15. '+WSAIO.checkout_message+'
        16. '); _limitsUl.append('
        17. Fulfill minimum order requirements to avail discount
        18. '); } window.disable_checkout_MOQ = true; } } window.MOQ_alert = '

          Order requirements not met.

            '+_limitsUl.html()+'
          '; } }) } if ("function" === typeof callback) { callback('done') } } } } }); // ==========================================product page function call ==================================================== $(document).ready(function(){ var checkerr = false; var fff = setInterval(function(e){ if($('.quickshop').hasClass('quickshop-visible') && checkerr == false){ checkerr = true; $('.col_clct').each(function(){ var clctn_dta = JSON.parse($(this).attr("clct")); for(var i=0;i
          Hormone Levels & Fertility Bloodwork (2024)

          References

          Top Articles
          Latest Posts
          Recommended Articles
          Article information

          Author: Amb. Frankie Simonis

          Last Updated:

          Views: 6591

          Rating: 4.6 / 5 (56 voted)

          Reviews: 87% of readers found this page helpful

          Author information

          Name: Amb. Frankie Simonis

          Birthday: 1998-02-19

          Address: 64841 Delmar Isle, North Wiley, OR 74073

          Phone: +17844167847676

          Job: Forward IT Agent

          Hobby: LARPing, Kitesurfing, Sewing, Digital arts, Sand art, Gardening, Dance

          Introduction: My name is Amb. Frankie Simonis, I am a hilarious, enchanting, energetic, cooperative, innocent, cute, joyous person who loves writing and wants to share my knowledge and understanding with you.