var products = [];
products[214] = ["Adjustable Toilet Safety Rail with Handles", 44.99, "Meet Keto", "Simplify bathroom accessibility with our sturdy and detachable toilet safety rail. Designed for quick installation and reliable support, it's compatible with most toilet designs, offering a practical solution for elderly and handicapped individuals seeking enhanced safety and comfort.", "", "By placing an order with us you will be charged $ __prc__ + $0.00 for S&H for __prdname__ of Meet Keto. If you are not completely satisfied with your purchase of __prdname__ at any time, please call 1-888-888-8888 or email support@meetketo.com. You will receive your package within 2-5 business days of payment via USPS First Class Mail.", ""];
products[215] = ["Breathing Trainer & Lung Capacity Enhancer", 29.99, "Meet Keto", "Enhance your respiratory wellness with our user-friendly device, a versatile lung strengthening trainer designed to improve breathing efficiency and airway clearance. This vital capacity exerciser offers comfortable and easy-to-clean operation, making it suitable for all ages seeking COPD relief, snoring reduction, and effective mucus removal.", "
", "By placing an order with us you will be charged $ __prc__ + $0.00 for S&H for __prdname__ of Meet Keto. If you are not completely satisfied with your purchase of __prdname__ at any time, please call 1-888-888-8888 or email support@meetketo.com. You will receive your package within 2-5 business days of payment via USPS First Class Mail.", ""];
products[216] = ["Cordless Leg Massager", 89.99, "Meet Keto", "This rechargeable leg circulation booster delivers targeted air compression and gentle heat, offering three customizable modes to alleviate pain and promote muscle relaxation. This wireless heated leg relaxer is designed for effortless use, providing a convenient way to improve your overall wellness. ", "
", "By placing an order with us you will be charged $ __prc__ + $0.00 for S&H for __prdname__ of Meet Keto. If you are not completely satisfied with your purchase of __prdname__ at any time, please call 1-888-888-8888 or email support@meetketo.com. You will receive your package within 2-5 business days of payment via USPS First Class Mail.", ""];
products[217] = ["Fingertip Pulse Oximeter Blood Oxygen Monitor", 19.99, "Meet Keto", "This digital oxygen saturation reader may provide quick and accurate readings of your blood oxygen saturation levels and pulse rate, empowering you to track your vital signs with confidence. Designed for everyday convenience, this compact oxygen level & pulse meter features a protective silicone cover, included batteries, and a handy lanyard for effortless portability.", "
", "By placing an order with us you will be charged $ __prc__ + $0.00 for S&H for __prdname__ of Meet Keto. If you are not completely satisfied with your purchase of __prdname__ at any time, please call 1-888-888-8888 or email support@meetketo.com. You will receive your package within 2-5 business days of payment via USPS First Class Mail.", ""];
products[218] = ["Memory Foam Massage Pillow", 119.99, "Meet Keto", "Indulge in deep relaxation and targeted relief with our Memory Foam Massage Pillow. This innovative pillow combines the soothing comfort of memory foam with therapeutic heating, invigorating vibration, and gentle 135° traction, providing a comprehensive massage experience for your neck and waist. The breathable design ensures optimal comfort, while the multi-functional features promote muscle relaxation, alleviate tension, and encourage healthy stretching. ", "
", "By placing an order with us you will be charged $ __prc__ + $0.00 for S&H for __prdname__ of Meet Keto. If you are not completely satisfied with your purchase of __prdname__ at any time, please call 1-888-888-8888 or email support@meetketo.com. You will receive your package within 2-5 business days of payment via USPS First Class Mail.", ""];
products[219] = ["Neck Stretcher Cervical Traction Device", 34.99, "Meet Keto", "Relieve neck pain and restore comfort with our adjustable, inflatable cervical traction device. This innovative neck stretcher provides targeted neck decompression, gently stretching and supporting your cervical spine to alleviate tension and discomfort. Experience personalized relief with customizable inflation levels, allowing you to tailor the treatment to your specific needs.", "
", "By placing an order with us you will be charged $ __prc__ + $0.00 for S&H for __prdname__ of Meet Keto. If you are not completely satisfied with your purchase of __prdname__ at any time, please call 1-888-888-8888 or email support@meetketo.com. You will receive your package within 2-5 business days of payment via USPS First Class Mail.", ""];
products[220] = ["Portable Pill Cutter", 24.99, "Meet Keto", "This compact pill splitter offers precise tablet cutting, allowing you to easily divide pills to your prescribed dosage. Designed with a built-in storage box, it keeps your medication organized and readily accessible, making it perfect for both home use and travel.", "
", "By placing an order with us you will be charged $ __prc__ + $0.00 for S&H for __prdname__ of Meet Keto. If you are not completely satisfied with your purchase of __prdname__ at any time, please call 1-888-888-8888 or email support@meetketo.com. You will receive your package within 2-5 business days of payment via USPS First Class Mail.", ""];
products[221] = ["Red Light Therapy Pad", 89.99, "Meet Keto", "Experience targeted pain relief and promote natural healing with our Portable Red Light This versatile wrap delivers deep therapy, effectively addressing discomfort in your back, knees, hands, and feet. Designed for ease of use, this home heating solution offers a convenient way to alleviate pain and reduce inflammation, making it an ideal therapeutic tool for both men and women seeking natural, non-invasive relief.", "
", "By placing an order with us you will be charged $ __prc__ + $0.00 for S&H for __prdname__ of Meet Keto. If you are not completely satisfied with your purchase of __prdname__ at any time, please call 1-888-888-8888 or email support@meetketo.com. You will receive your package within 2-5 business days of payment via USPS First Class Mail.", ""];
products[222] = ["Versatile Knee & Leg Massager", 64.99, "Meet Keto", "Discover targeted relief and enhanced comfort with our Versatile Knee & Leg Massager. This USB rechargeable device offers customizable heat and vibration settings, providing soothing relief for knees, shoulders, and elbows. Its ergonomic design allows for flexible application, making it an ideal solution for addressing muscle tension and promoting relaxation in multiple areas. ", "
", "By placing an order with us you will be charged $ __prc__ + $0.00 for S&H for __prdname__ of Meet Keto. If you are not completely satisfied with your purchase of __prdname__ at any time, please call 1-888-888-8888 or email support@meetketo.com. You will receive your package within 2-5 business days of payment via USPS First Class Mail.", ""];
products[223] = ["Keto + ACV Gummies", 129.99, "Meet Keto", "Discover a convenient and tasty addition to your balanced lifestyle with our KETO + ACV Gummies. Formulated with key ingredients, these gummies may help support your weight management goals, contribute to sustained energy levels, and promote overall well-being. Enjoy a delicious way to potentially enhance your daily routine.", "
", "By placing an order with us you will be charged $ __prc__ + $0.00 for S&H for __prdname__ __qnty__ One Time Purchase of Meet Keto. If you are not completely satisfied with your purchase of __prdname__ at any time, please call 1-888-888-8888 or email support@meetketo.com. You will receive your package within 2-5 business days of payment via USPS First Class Mail.", "Buy 1 Get 1 Free"];
products[225] = ["Keto + ACV Gummies", 189.99, "Meet Keto", "", "
", "By placing an order with us you will be charged $ __prc__ + $0.00 for S&H for __prdname__ __qnty__ One Time Purchase of Meet Keto. If you are not completely satisfied with your purchase of __prdname__ at any time, please call 1-888-888-8888 or email support@meetketo.com. You will receive your package within 2-5 business days of payment via USPS First Class Mail.", "Buy 2 Get 2 Free"];
products[226] = ["Keto + ACV Gummies", 239.99, "Meet Keto", "", "
", "By placing an order with us you will be charged $ __prc__ + $0.00 for S&H for __prdname__ __qnty__ One Time Purchase of Meet Keto. If you are not completely satisfied with your purchase of __prdname__ at any time, please call 1-888-888-8888 or email support@meetketo.com. You will receive your package within 2-5 business days of payment via USPS First Class Mail.", "Buy 3 Get 3 Free"];
products[229] = ["Keto + ACV Gummies", 129.99, "Meet Keto", "Discover a convenient and tasty addition to your balanced lifestyle with our KETO + ACV Gummies. Formulated with key ingredients, these gummies may help support your weight management goals, contribute to sustained energy levels, and promote overall well-being. Enjoy a delicious way to potentially enhance your daily routine. ", "
", "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.", "Buy 1 Get 1 Free (Monthly Subscription)"];
products[230] = ["Keto + ACV Gummies", 189.99, "Meet Keto", "", "
", "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.", "Buy 2 Get 2 Free (Monthly Subscription)"];
products[231] = ["Keto + ACV Gummies", 239.99, "Meet Keto", "", "
", "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.", "Buy 3 Get 3 Free (Monthly Subscription)"];
products[227] = ["Cleanse (2 Bottles)", 59.99, "Meet Keto", "Discover the refreshing way to potentially support your body's natural cleansing abilities with our Cleanse Gummies. Crafted with care from natural ingredients, these gummies may help gently detoxify, aid digestion, and provide a mild energy lift. Feel the difference as your skin may radiate and you may embrace a revitalized sense of well-being, one delicious gummy at a time.", "
", "By placing an order with us you will be charged $ __prc__ + $0.00 for S&H for __prdname__ __qnty__ One Time Purchase of Meet Keto. If you are not completely satisfied with your purchase of __prdname__ at any time, please call 1-888-888-8888 or email support@meetketo.com. You will receive your package within 2-5 business days of payment via USPS First Class Mail.", "2 Bottles"];
products[228] = ["Keto Diet Ebook", 1.5, "Meet Keto", "This Ebook may help guide you through the ketogenic lifestyle, offering practical advice to make your transition smoother. It includes helpful tips, meal planning strategies, and a variety of delicious recipes to keep you on track while enjoying the benefits of a low-carb, high-fat diet.", "
", "By placing an order with us you will be charged $ __prc__ + $0.00 for S&H for __prdname__ Meet Keto. If you are not completely satisfied with your purchase of __prdname__ at any time, please call 1-888-888-8888 or email support@meetketo.com. You will receive your package within 2-5 business days of payment via USPS First Class Mail.", ""];
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((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 += "" + products[prodId][4] + " "+ quantity +"
" + "" + products[prodId][0] + " " + products[prodId][6] + "
" + "Qty: "+ quantity +"
" + " $" + sub_total.toFixed(2) + "