var products = []; products[100] = ["ATIV Immune Daily Immune Defense Drink Mix", 29.98, "Everyday Health Plus", "Designed to fit seamlessly into your routine, it may help support a healthy immune system and promote overall resilience. With a refreshing taste and easy-to-mix formula, it’s a simple way to care for your wellness every day. Whether you’re at home, at work, or on the go, ATIV Immune may help strengthen your body’s natural defenses so you can feel your best, no matter what the day brings.", "", "By placing an order with us you will be charged $ __prc__ + $0.00 for S&H for __prdname__ __qnty__ One Time Purchase of Everyday Health Plus. If you are not completely satisfied with your purchase of __prdname__ at any time, please call 1-833-201-1413 or email support@everydayhealthplus.com. You will receive your package within 3-5 business days of payment via USPS First Class Mail. Your card will be billed as Everyday Health Plus.", "", "001"]; products[101] = ["ATIV Calcium Bone, Joint & Muscle Support Drink", 35, "Everyday Health Plus", "A refreshing bone, joint, and muscle support drink that may help maintain strong bones and teeth while supporting overall mobility and strength. Formulated to fit into your daily routine, it may help keep your body active, resilient, and ready for everyday movement.", "", "By placing an order with us you will be charged $ __prc__ + $0.00 for S&H for __prdname__ __qnty__ One Time Purchase of Everyday Health Plus. If you are not completely satisfied with your purchase of __prdname__ at any time, please call 1-833-201-1413 or email support@everydayhealthplus.com. You will receive your package within 3-5 business days of payment via USPS First Class Mail. Your card will be billed as Everyday Health Plus.", "", "002"]; products[102] = ["ATIV Electrolyte Powder Rose Lemonade", 27.9, "Everyday Health Plus", "ATIV Electrolyte Powder in Rose Lemonade flavor may help to refresh and hydrate your body. This supplement contains essential electrolytes that may provide hydration equivalent to three bottles of water. Additionally, it may support your body's natural inflammatory response, promoting a sense of overall wellness, balance, and rejuvenation. ", "", "By placing an order with us you will be charged $ __prc__ + $0.00 for S&H for __prdname__ __qnty__ One Time Purchase of Everyday Health Plus. If you are not completely satisfied with your purchase of __prdname__ at any time, please call 1-833-201-1413 or email support@everydayhealthplus.com. You will receive your package within 3-5 business days of payment via USPS First Class Mail. Your card will be billed as Everyday Health Plus.", "", "003"]; products[103] = ["ATIV Electrolyte Powder Pineapple Lemonade", 24.98, "Everyday Health Plus", "Rejuvenate your body with a refreshing hydration drink designed to keep you balanced and energized. This daily support formula may help restore essential fluids, replenish electrolytes, and promote recovery after activity. With regular use, ATIV Electrolyte may help support hydration, energy, and overall wellness—so you can feel your best anytime, anywhere.", "", "By placing an order with us you will be charged $ __prc__ + $0.00 for S&H for __prdname__ __qnty__ One Time Purchase of Everyday Health Plus. If you are not completely satisfied with your purchase of __prdname__ at any time, please call 1-833-201-1413 or email support@everydayhealthplus.com. You will receive your package within 3-5 business days of payment via USPS First Class Mail. Your card will be billed as Everyday Health Plus.", "", "004"]; products[104] = ["Cordyceps + Reishi Immune & Energy Support Capsules", 24.98, "Everyday Health Plus", "JBA Cordyceps + Reishi is a high-quality supplement that combines two traditional mushrooms to support overall vitality. This blend may help support the immune system and promote sustained energy. Additionally, it may assist in increasing cellular oxygen absorption, which is beneficial for active lifestyles. The supplement may also help support healthy kidney function.", "", "By placing an order with us you will be charged $ __prc__ + $0.00 for S&H for __prdname__ __qnty__ One Time Purchase of Everyday Health Plus. If you are not completely satisfied with your purchase of __prdname__ at any time, please call 1-833-201-1413 or email support@everydayhealthplus.com. You will receive your package within 3-5 business days of payment via USPS First Class Mail. Your card will be billed as Everyday Health Plus.", "", "005"]; products[105] = ["Eucalyptus Softgels Respiratory & Pain Relief", 24.98, "Everyday Health Plus", "This product may help relieve symptoms of cough, cold, pain, and inflammation. Formulated with eucalyptus oil, known for its natural anti-inflammatory, analgesic, and decongestant properties, it may support respiratory health and ease discomfort.", "", "By placing an order with us you will be charged $ __prc__ + $0.00 for S&H for __prdname__ __qnty__ One Time Purchase of Everyday Health Plus. If you are not completely satisfied with your purchase of __prdname__ at any time, please call 1-833-201-1413 or email support@everydayhealthplus.com. You will receive your package within 3-5 business days of payment via USPS First Class Mail. Your card will be billed as Everyday Health Plus.", "", "006"]; products[106] = ["Happy Heart Aged Black Garlic + Policosanol", 24.98, "Everyday Health Plus", "JBA Happy Heart is a premium supplement that may help support overall heart and circulatory wellness. Made with a blend of aged black garlic and policosanol, it may help maintain healthy cholesterol levels already within the normal range. This non-GMO, gluten-free formula is made in the USA and may help you support your cardiovascular health with confidence.", "", "By placing an order with us you will be charged $ __prc__ + $0.00 for S&H for __prdname__ __qnty__ One Time Purchase of Everyday Health Plus. If you are not completely satisfied with your purchase of __prdname__ at any time, please call 1-833-201-1413 or email support@everydayhealthplus.com. You will receive your package within 3-5 business days of payment via USPS First Class Mail. Your card will be billed as Everyday Health Plus.", "", "007"]; products[107] = ["VeRestor® RTD Powder Nattokinase + Vitamins", 8.99, "Everyday Health Plus", "VeRestor® RTD Powder is a premium cardiovascular support supplement that may help promote heart health and maintain clear, flexible blood vessels. Each serving contains 4000 FU of Nattokinase, a powerful enzyme known for its ability to support healthy circulation and overall cardiovascular wellness. This carefully formulated supplement may help enhance blood flow and contribute to long-term heart health as part of a balanced lifestyle.", "", "By placing an order with us you will be charged $ __prc__ + $0.00 for S&H for __prdname__ __qnty__ One Time Purchase of Everyday Health Plus. If you are not completely satisfied with your purchase of __prdname__ at any time, please call 1-833-201-1413 or email support@everydayhealthplus.com. You will receive your package within 3-5 business days of payment via USPS First Class Mail. Your card will be billed as Everyday Health Plus.", "", "008"]; products[108] = ["Micro Curcumin Advanced Absorption", 9.98, "Everyday Health Plus", "Micro curcumin may help support overall health by reducing inflammation and fighting oxidative stress. Its powerful antioxidant properties may help protect cells and support cognitive function, potentially aiding brain health and reducing age-related decline. Additionally, micro curcumin may help promote healthier, more radiant skin by calming inflammation and enhancing skin vitality.", "", "By placing an order with us you will be charged $ __prc__ + $0.00 for S&H for __prdname__ __qnty__ One Time Purchase of Everyday Health Plus. If you are not completely satisfied with your purchase of __prdname__ at any time, please call 1-833-201-1413 or email support@everydayhealthplus.com. You will receive your package within 3-5 business days of payment via USPS First Class Mail. Your card will be billed as Everyday Health Plus.", "", "009"]; products[109] = ["Joint Revive™ The Legend II Fucoidan 85% Softgels", 19.98, "Everyday Health Plus", "JOINT REVIVE™ The LEGEND may help support overall joint health and mobility through its powerful blend of Glucosamine, Fucoidan, and Reishi mushroom extract. This unique formula may help enhance stem cell function and promote healthy immune system support, contributing to better joint comfort and overall wellness.", "", "By placing an order with us you will be charged $ __prc__ + $0.00 for S&H for __prdname__ __qnty__ One Time Purchase of Everyday Health Plus. If you are not completely satisfied with your purchase of __prdname__ at any time, please call 1-833-201-1413 or email support@everydayhealthplus.com. You will receive your package within 3-5 business days of payment via USPS First Class Mail. Your card will be billed as Everyday Health Plus.", "", "010"]; products[110] = ["ATIV Immune Daily Immune Defense Drink Mix", 25.48, "Everyday Health Plus", "", "", "By placing your monthly recurring order of __prdname__ __qnty__ you will be charged $ __prc__ now and every 30 days thereafter until you cancel your subscription. You will receive an electronic notification 5 to 7 days prior to your transaction and a receipt after each successful transaction. You will receive your package within 3-5 business days of payment via USPS First Class Mail. Your card will be billed as Everyday Health Plus.", "Monthly Subscription", "001"]; products[111] = ["ATIV Calcium Bone, Joint & Muscle Support Drink", 29.75, "Everyday Health Plus", "", "", "By placing your monthly recurring order of __prdname__ __qnty__ you will be charged $ __prc__ now and every 30 days thereafter until you cancel your subscription. You will receive an electronic notification 5 to 7 days prior to your transaction and a receipt after each successful transaction. You will receive your package within 3-5 business days of payment via USPS First Class Mail. Your card will be billed as Everyday Health Plus.", "Monthly Subscription", "002"]; products[112] = ["ATIV Electrolyte Powder Rose Lemonade", 23.71, "Everyday Health Plus", "", "", "By placing your monthly recurring order of __prdname__ __qnty__ you will be charged $ __prc__ now and every 30 days thereafter until you cancel your subscription. You will receive an electronic notification 5 to 7 days prior to your transaction and a receipt after each successful transaction. You will receive your package within 3-5 business days of payment via USPS First Class Mail. Your card will be billed as Everyday Health Plus.", "Monthly Subscription", "003"]; products[113] = ["ATIV Electrolyte Powder Pineapple Lemonade", 21.23, "Everyday Health Plus", "", "", "By placing your monthly recurring order of __prdname__ __qnty__ you will be charged $ __prc__ now and every 30 days thereafter until you cancel your subscription. You will receive an electronic notification 5 to 7 days prior to your transaction and a receipt after each successful transaction. You will receive your package within 3-5 business days of payment via USPS First Class Mail. Your card will be billed as Everyday Health Plus.", "Monthly Subscription", "004"]; products[114] = ["Cordyceps + Reishi Immune & Energy Support Capsules", 21.23, "Everyday Health Plus", "", "", "By placing your monthly recurring order of __prdname__ __qnty__ you will be charged $ __prc__ now and every 30 days thereafter until you cancel your subscription. You will receive an electronic notification 5 to 7 days prior to your transaction and a receipt after each successful transaction. You will receive your package within 3-5 business days of payment via USPS First Class Mail. Your card will be billed as Everyday Health Plus.", "Monthly Subscription", "005"]; products[115] = ["Eucalyptus Softgels Respiratory & Pain Relief", 21.23, "Everyday Health Plus", "", "", "By placing your monthly recurring order of __prdname__ __qnty__ you will be charged $ __prc__ now and every 30 days thereafter until you cancel your subscription. You will receive an electronic notification 5 to 7 days prior to your transaction and a receipt after each successful transaction. You will receive your package within 3-5 business days of payment via USPS First Class Mail. Your card will be billed as Everyday Health Plus.", "Monthly Subscription", "006"]; products[116] = ["Happy Heart Aged Black Garlic + Policosanol", 21.23, "Everyday Health Plus", "Prioritize your well-being with our Blood Health Gummies. This expertly crafted formula may help support healthy circulation, naturally boost your energy, and contribute to balanced blood sugar and metabolic wellness.", "", "By placing your monthly recurring order of __prdname__ __qnty__ you will be charged $ __prc__ now and every 30 days thereafter until you cancel your subscription. You will receive an electronic notification 5 to 7 days prior to your transaction and a receipt after each successful transaction. You will receive your package within 3-5 business days of payment via USPS First Class Mail. Your card will be billed as Everyday Health Plus.", "Monthly Subscription", "007"]; products[117] = ["VeRestor® RTD Powder Nattokinase + Vitamins", 7.94, "Everyday Health Plus", "", "", "By placing your monthly recurring order of __prdname__ __qnty__ you will be charged $ __prc__ now and every 30 days thereafter until you cancel your subscription. You will receive an electronic notification 5 to 7 days prior to your transaction and a receipt after each successful transaction. You will receive your package within 3-5 business days of payment via USPS First Class Mail. Your card will be billed as Everyday Health Plus.", "Monthly Subscription", "008"]; products[118] = ["Micro Curcumin Advanced Absorption", 8.48, "Everyday Health Plus", "", "", "By placing your monthly recurring order of __prdname__ __qnty__ you will be charged $ __prc__ now and every 30 days thereafter until you cancel your subscription. You will receive an electronic notification 5 to 7 days prior to your transaction and a receipt after each successful transaction. You will receive your package within 3-5 business days of payment via USPS First Class Mail. Your card will be billed as Everyday Health Plus.", "Monthly Subscription", "009"]; products[119] = ["Joint Revive™ The Legend II Fucoidan 85% Softgels", 16.98, "Everyday Health Plus", "", "", "By placing your monthly recurring order of __prdname__ __qnty__ you will be charged $ __prc__ now and every 30 days thereafter until you cancel your subscription. You will receive an electronic notification 5 to 7 days prior to your transaction and a receipt after each successful transaction. You will receive your package within 3-5 business days of payment via USPS First Class Mail. Your card will be billed as Everyday Health Plus.", "Monthly Subscription", "010"]; console.log(products); var orderedItems = []; var orderedTotQty = 0; var maxQty = 10; var shipRates = false; var handling = 0; var carturl = "cart.php"; //Funtion adds Items to Cart var addItem = function(itemId, Qty, comnId) { orderedTotQty = $.cookie('orderedTotQty'); if (!orderedTotQty) { orderedTotQty = 0; } Qty = parseInt(Qty); if(Qty > maxQty) { alert("Maximum " + maxQty + " of this product can be selected in a single order"); return false; } var order = $.cookie('order'); if (!order) { order = itemId + "-" + Qty + "-" + comnId; orderedItems[itemId] = Qty; } else { var itemExists = false; var items = order.split("|"); order = ""; for (var i = 0; i < items.length; i = i + 1) { var position = items[i].indexOf("-"); var prodId = items[i].substring(0, position); var comn_Id = parseInt(items[i].substring(position + 3)); //alert(comn_Id); var quantity = parseInt(items[i].substring(position + 1)); if (order != "") { order += "|"; } if (prodId == itemId) { //alert(comn_Id); alert("Product already exist in cart"); return false; if((quantity + Qty) > maxQty) { alert("Maximum " + maxQty + " of this product can be selected in a single order"); return false; } quantity += Qty; order += itemId + "-" + quantity + "-" + comnId; itemExists = true; } else { if(comn_Id == comnId){ alert("Product already exist in cart"); return false; itemExists = true; }else{ order += prodId + "-" + quantity + "-" + comnId; } } orderedItems[prodId] = quantity; } if (!itemExists) { if (order != "") { order += "|"; } order += itemId + "-" + Qty + "-" + comnId; orderedItems[itemId] = Qty; } } orderedTotQty = parseInt(orderedTotQty); orderedTotQty += Qty; $('.cartqty').html(orderedTotQty); $.cookie('order', order); $.cookie('orderedTotQty', orderedTotQty); var url = window.location.pathname; var filename = url.substring(url.lastIndexOf('/') + 1); if (filename == carturl) { showCart(false, 'add', itemId); } else { $(location).attr('href', carturl); } }; //Funtion decrements Items to Cart var removeItem = function(itemId, Qty, comnId) { Qty = parseInt(Qty); var order = $.cookie('order'); if (!order) { orderedItems[itemId] = 0; refreshRow(itemId); } else { var items = order.split("|"); order = ""; for (var i = 0; i < items.length; i = i + 1) { var position = items[i].indexOf("-"); var prodId = items[i].substring(0, position); var quantity = parseInt(items[i].substring(position + 1)); if (prodId == itemId) { quantity -= Qty; if (quantity > 0) { if (order != "") { order += "|"; } order += prodId + "-" + quantity; } itemExists = true; orderedItems[prodId] = quantity; refreshRow(itemId); } else { if (order != "") { order += "|"; } order += prodId + "-" + quantity; orderedItems[prodId] = quantity; } } } orderedTotQty -= Qty; $('.cartqty').html(orderedTotQty); $.cookie('order', order); $.cookie('orderedTotQty', orderedTotQty); var url = window.location.pathname; var filename = url.substring(url.lastIndexOf('/') + 1); if (filename == carturl) { showCart(false, 'remove', itemId); } else { //$(location).attr('href', carturl); } }; //Funtion sets Item quantity on the Cart var setItemQty = function(itemId, Qty, comnId) { Qty = parseInt(Qty); if(Qty > maxQty || Qty < 0) { return false; } var order = $.cookie('order'); orderedTotQty = 0; if (!order) { orderedItems[itemId] = 0; } else { var items = order.split("|"); order = ""; for (var i = 0; i < items.length; i = i + 1) { var position = items[i].indexOf("-"); var prodId = items[i].substring(0, position); var quantity = parseInt(items[i].substring(position + 1)); if (prodId == itemId) { quantity = Qty; if (order != "") { order += "|"; } order += prodId + "-" + quantity; itemExists = true; } else { if (order != "") { order += "|"; } order += prodId + "-" + quantity; } orderedItems[prodId] = quantity; orderedTotQty += quantity; } } $('.cartqty').html(orderedTotQty); $.cookie('order', order); $.cookie('orderedTotQty', orderedTotQty); var url = window.location.pathname; var filename = url.substring(url.lastIndexOf('/') + 1); if (filename == carturl) { showCart(false, 'set', itemId); } else { //$(location).attr('href', carturl); } }; var removeRowItem = function(itemId) { var order = $.cookie('order'); if (!order) { orderedTotQty = 0; } else { var items = order.split("|"); order = ""; orderedTotQty = 0; orderedItems = null; orderedItems = new Array(); for (var i = 0; i < items.length; i = i + 1) { var position = items[i].indexOf("-"); var prodId = items[i].substring(0, position); var quantity = parseInt(items[i].substring(position + 1)); if (prodId == itemId) { } else { if (order != "") { order += "|"; } order += prodId + "-" + quantity; orderedTotQty += quantity; orderedItems[prodId] = quantity; } } } if($('#prow-' + itemId).length == 1) { $('#prow-' + itemId).remove(); $('#term-' + itemId).remove(); } $.cookie('order', order); $.cookie('orderedTotQty', orderedTotQty); showCart(false, 'removerow', itemId); }; //Emptying the cart var emptyCart = function() { var order = $.cookie('order'); order = ""; orderedTotQty = 0; orderedItems = null; orderedItems = new Array(); $.cookie('order', order); $.cookie('orderedTotQty', orderedTotQty); if($('[id^="prow-"]').length > 0) { $('[id^="prow-"]').each(function(){ $(this).remove(); }); } showCart(false, 'empty'); }; function replaceAllStr(str, find, rstr) { //return str.replace(new RegExp(escapeRegExp(find), 'g'), replace); //return str.replace(/find/g, '\\$&'); return str.replace(new RegExp(find, "g"), rstr); } //Displaying the cart items & calculations function showTotalPrice() { var cartHtml = ""; var total = 0; var shipping = 0; var grand_total = 0; var sub_total = 0; var shippingType = ''; var order = $.cookie('order'); orderedTotQty = $.cookie('orderedTotQty'); if($('#shippingCountry').val() == '') { shippingType = ''; } else if($('#shippingCountry').val() == 'US') { shippingType = 'US'; } else { shippingType = 'INTERNATIONAL'; } if (!order) { orderedTotQty = 0; } else { var items = order.split("|"); if(shipRates) { shipping = shipRates * 1.0; } for (var i = 0; i < items.length; i = i + 1) { var position = items[i].indexOf("-"); var prodId = items[i].substring(0, position); var quantity = parseInt(items[i].substring(position + 1)); if (prodId != "" && quantity > 0) { sub_total = round((quantity * products[prodId][1]), 2); total += (quantity * products[prodId][1]); } } total = round(total, 2); } var snh = shipping + handling; //if(shipping == 0) { // snh = shipping; //} console.log(snh); grand_total = total + snh; $('#total-price').html('$ ' + total.toFixed(2)); $('#shipping-price').html('$ ' + snh.toFixed(2)); $('#grand-total').html('$ ' + grand_total.toFixed(2)); }; // Refresh row content with updated quantity / price for a product function refreshRow(pid) { pid = parseInt(pid); quantity = orderedItems[pid]; sub_total = round((quantity * products[prodId][1]), 2); $('#prow-' + pid + ' .tot-price').html('$' + sub_total.toFixed(2) + ' USD'); $('#prow-' + pid + ' .qtybox').val(quantity); $('#prow-' + pid + ' .dispqty').html(quantity); } //Displaying the cart items & calculations function showCart(showFullCart, act, itm) { var cartHtml = ""; var order = $.cookie('order'); orderedTotQty = $.cookie('orderedTotQty'); if (!order) { orderedTotQty = 0; if($('[id^="prow-"]').length == 0) { $("#cartBox").html("

You have not selected any product...

  Browse Products"); } showTotalPrice(); return false; } else { var items = order.split("|"); var total = 0; var shipping = 0; var grand_total = 0; orderedTotQty = parseInt(orderedTotQty); //console.log('showFullCart'); //console.log(showFullCart); if (typeof showFullCart === "undefined") { return false; } else if(showFullCart == false) { if ((typeof act !== "undefined") && (typeof itm !== "undefined")) { if((act == 'add' || act == 'set' || act == 'remove') && itm > 0) { refreshRow(itm); } else if(act == 'removerow' && itm > 0) { itm = parseInt(itm); } } showTotalPrice(); return false; } orderedItems = null; orderedItems = new Array(); cartHtml += "
Order Summary Price
"; cartHtml += "
Order Summary QtyUnit PriceTotal
"; var total = 0; var term_htm =''; for (var i = 0; i < items.length; i = i + 1) { var position = items[i].indexOf("-"); var prodId = items[i].substring(0, position); var quantity = parseInt(items[i].substring(position + 1)); if (prodId != "" && quantity > 0) { orderedItems[prodId] = quantity; var sub_total = round((quantity * products[prodId][1]), 2); total += sub_total; termTxt = products[prodId][5]; termTxt = replaceAllStr(termTxt, ' __prc__', quantity * products[prodId][1].toFixed(2)); termTxt = replaceAllStr(termTxt, '__prdname__', products[prodId][0]); termTxt = replaceAllStr(termTxt, '__prdqnty__', products[prodId][5]); termTxt = replaceAllStr(termTxt, '__qnty__', products[prodId][6]); term_htm += '' + termTxt + ''; cartHtml += "
" + "
" + "

" + products[prodId][4] + " "+ quantity +"

" + "
" + "

" + products[prodId][0] + " " + products[prodId][6] + "

" + "

$" + sub_total.toFixed(2) + "

" + "
" + "
" + "" + ""+ "
"+ quantity +"
" + "
$" + (products[prodId][1]).toFixed(2) + "
" + "
" } } cartHtml += "
"; cartHtml += "
" +"
" +"
    " +"
  • Sub Total: $" + total.toFixed(2) + "
  • " +"
  • Shipping & Handling: $0.00
  • " +"
  • Total: $" + total.toFixed(2) + "
  • " +"
" +"
" +"
"; cartHtml += "
" if (cartHtml != "") { $("#cartBox").html(cartHtml); $(".cart-box").html(cartHtml); $(".trm_1").html(term_htm); } else { $("#cartBox").html(" Loading..."); $(".cart-box").html('You have not selected any product... '); } return false; } }; var round = function(value, decimals) { return Number(Math.round(value + 'e' + decimals) + 'e-' + decimals); };