var products = []; products[214] = ["Self-Adhesive Bandage", 1.99, "New Health Regenix", "A self-adhesive bandage is a flexible, stretchable material that adheres to itself without requiring additional tape. It's commonly used to secure dressings, compress wounds, support joints, and immobilize injuries. Made from breathable and water-resistant materials, it offers comfort and flexibility while providing support.", "", "By placing an order with us you will be charged $ __prc__ + $0.00 for S&H for One Time for a __prdname__ . If you are not completely satisfied with your purchase __prdname__ at any time, please call (888) 378-4191 or email care@newhealthregenix.com, Monday to Friday : 24 Hours | Sat & Sun : 7AM - 11PM (EST). You will receive your package within 2-5 business days of payment via USPS First Class Mail. I agree that my credit card charge will appear as New Health Regenix.", "1"]; products[215] = ["Medical Wipes (1000 Per Pack)", 9.99, "New Health Regenix", "Medical wipes are pre-moistened cloths designed for cleaning and disinfecting various surfaces and skin. They are often used in healthcare settings, but can also be used at home. A pack typically contains 1000 individually wrapped wipes. They are often infused with antiseptic or antibacterial agents to help prevent the spread of germs.", "", "By placing an order with us you will be charged $ __prc__ + $0.00 for S&H for One Time for a __prdname__ . If you are not completely satisfied with your purchase __prdname__ at any time, please call (888) 378-4191 or email care@newhealthregenix.com, Monday to Friday : 24 Hours | Sat & Sun : 7AM - 11PM (EST). You will receive your package within 2-5 business days of payment via USPS First Class Mail. I agree that my credit card charge will appear as New Health Regenix.", "1"]; products[216] = ["Blood Sugar Test Kit", 59.99, "New Health Regenix", "A blood sugar test kit is a home-use medical device used to monitor glucose levels in the blood. It typically includes a lancet device, test strips, and a glucometer. People with diabetes use these kits to manage their condition by checking blood sugar levels regularly.", "", "By placing an order with us you will be charged $ __prc__ + $0.00 for S&H for One Time for a __prdname__ . If you are not completely satisfied with your purchase __prdname__ at any time, please call (888) 378-4191 or email care@newhealthregenix.com, Monday to Friday : 24 Hours | Sat & Sun : 7AM - 11PM (EST). You will receive your package within 2-5 business days of payment via USPS First Class Mail. I agree that my credit card charge will appear as New Health Regenix.", "1"]; products[217] = ["First Aid Kit", 129.99, "New Health Regenix", "A first aid kit is a collection of essential medical supplies and tools used for treating common injuries. It's designed for immediate care before professional medical help arrives. Typically includes items like bandages, antiseptic wipes, pain relievers, and other necessary supplies.", "", "By placing an order with us you will be charged $ __prc__ + $0.00 for S&H for One Time for a __prdname__ . If you are not completely satisfied with your purchase __prdname__ at any time, please call (888) 378-4191 or email care@newhealthregenix.com, Monday to Friday : 24 Hours | Sat & Sun : 7AM - 11PM (EST). You will receive your package within 2-5 business days of payment via USPS First Class Mail. I agree that my credit card charge will appear as New Health Regenix.", "1"]; products[218] = ["Health Monitor (With Arm Strap)", 189.99, "New Health Regenix", "A health monitor with an arm strap is a wearable device that tracks various health metrics. It typically measures heart rate, blood pressure, and sometimes other parameters like blood oxygen levels, sleep patterns, and activity levels. Designed for comfort and accuracy, it provides valuable data for personal health management and potential early detection of health issues.", "", "By placing an order with us you will be charged $ __prc__ + $0.00 for S&H for One Time for a __prdname__ . If you are not completely satisfied with your purchase __prdname__ at any time, please call (888) 378-4191 or email care@newhealthregenix.com, Monday to Friday : 24 Hours | Sat & Sun : 7AM - 11PM (EST). You will receive your package within 2-5 business days of payment via USPS First Class Mail. I agree that my credit card charge will appear as New Health Regenix.", "1"]; products[219] = ["Cold Therapy System + Blood Sugar Kit", 239.99, "New Health Regenix", "Cold Therapy SystemThis component provides targeted cold therapy for pain relief, reducing swelling, and promoting faster recovery from injuries or post-surgery.Blood Sugar Test KitThis component enables users to monitor their blood glucose levels, essential for diabetes management and overall health.", "", "By placing an order with us you will be charged $ __prc__ + $0.00 for S&H for One Time for a __prdname__ . If you are not completely satisfied with your purchase __prdname__ at any time, please call (888) 378-4191 or email care@newhealthregenix.com, Monday to Friday : 24 Hours | Sat & Sun : 7AM - 11PM (EST). You will receive your package within 2-5 business days of payment via USPS First Class Mail. I agree that my credit card charge will appear as New Health Regenix.", "1"]; products[224] = ["Keto", 129.99, "New Health Regenix", "This keto-friendly supplement combines BHB salts, MCT oil, and L-Arginine Alpha-Ketoglutarate to support your ketogenic journey. It may help accelerate the transition into ketosis, may help maintain optimal ketone levels, and provide sustained energy for fitness enthusiasts.", "", "By placing an order with us you will be charged $ __prc__ + $0.00 for S&H for One Time for __prdqty__ of __prdname__ . If you are not completely satisfied with your purchase __prdname__ at any time, please call (888) 378-4191 or email care@newhealthregenix.com, Monday to Friday : 24 Hours | Sat & Sun : 7AM - 11PM (EST). You will receive your package within 2-5 business days of payment via USPS First Class Mail. I agree that my credit card charge will appear as New Health Regenix.", "2 Bottles"]; products[225] = ["Keto", 189.99, "New Health Regenix", "", "", "By placing an order with us you will be charged $ __prc__ + $0.00 for S&H for One Time for __prdqty__ of __prdname__ . If you are not completely satisfied with your purchase __prdname__ at any time, please call (888) 378-4191 or email care@newhealthregenix.com, Monday to Friday : 24 Hours | Sat & Sun : 7AM - 11PM (EST). You will receive your package within 2-5 business days of payment via USPS First Class Mail. I agree that my credit card charge will appear as New Health Regenix.", "4 Bottles"]; products[226] = ["Keto", 239.99, "New Health Regenix", "", "", "By placing an order with us you will be charged $ __prc__ + $0.00 for S&H for One Time for __prdqty__ of __prdname__ . If you are not completely satisfied with your purchase __prdname__ at any time, please call (888) 378-4191 or email care@newhealthregenix.com, Monday to Friday : 24 Hours | Sat & Sun : 7AM - 11PM (EST). You will receive your package within 2-5 business days of payment via USPS First Class Mail. I agree that my credit card charge will appear as New Health Regenix.", "6 Bottles"]; products[227] = ["Male Enhancement Gummies", 129.99, "New Health Regenix", "Designed to support the active lifestyle, this cutting-edge supplement may help boost male hormonal vitality that may help reignite the sexual drive, the alpha male confidence & the desire to conquer. It is made with a high potency blend of proven ingredients that have been known to support male health & performance. It is recommended to consult with a professional nutritionist for personalized guidance.", "", "By placing an order with us you will be charged $ __prc__ + $0.00 for S&H for One Time for __prdqty__ of __prdname__ . If you are not completely satisfied with your purchase __prdname__ at any time, please call (888) 378-4191 or email care@newhealthregenix.com, Monday to Friday : 24 Hours | Sat & Sun : 7AM - 11PM (EST). You will receive your package within 2-5 business days of payment via USPS First Class Mail. I agree that my credit card charge will appear as New Health Regenix.", "2 Bottles"]; products[228] = ["Male Enhancement Gummies", 189.99, "New Health Regenix", "", "", "By placing an order with us you will be charged $ __prc__ + $0.00 for S&H for One Time for __prdqty__ of __prdname__ . If you are not completely satisfied with your purchase __prdname__ at any time, please call (888) 378-4191 or email care@newhealthregenix.com, Monday to Friday : 24 Hours | Sat & Sun : 7AM - 11PM (EST). You will receive your package within 2-5 business days of payment via USPS First Class Mail. I agree that my credit card charge will appear as New Health Regenix.", "4 Bottles"]; products[229] = ["Male Enhancement Gummies", 239.99, "New Health Regenix", "", "", "By placing an order with us you will be charged $ __prc__ + $0.00 for S&H for One Time for __prdqty__ of __prdname__ . If you are not completely satisfied with your purchase __prdname__ at any time, please call (888) 378-4191 or email care@newhealthregenix.com, Monday to Friday : 24 Hours | Sat & Sun : 7AM - 11PM (EST). You will receive your package within 2-5 business days of payment via USPS First Class Mail. I agree that my credit card charge will appear as New Health Regenix.", "6 Bottles"]; 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) { 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; 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 quantity = parseInt(items[i].substring(position + 1)); if (order != "") { order += "|"; } if (prodId == itemId) { 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 += prodId + "-" + quantity; itemExists = true; } else { order += prodId + "-" + quantity; } orderedItems[prodId] = quantity; } if (!itemExists) { if (order != "") { order += "|"; } order += itemId + "-" + Qty; 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) { 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) { 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((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((products[pid][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 += "" + products[prodId][4] + " " + products[prodId][6] + "
" + "" + products[prodId][0] + "
" + "Qty: " + products[prodId][6] + "
" + "$" + sub_total.toFixed(2) + "
" + "