var products = []; products[211] = ["Microfiber Cleaning Cloths", 8.99, "Eye Vision Supply", "This value pack of 5 microfiber cleaning cloths may help you keep various surfaces spotless. The ultra-soft material effectively removes fingerprints, dust, and smudges without scratching. Individually packed for convenience, these durable and washable cloths may help maintain clarity on eyeglasses, phone screens, camera lenses, and more, offering a cost-effective and versatile cleaning solution.", "", "5 Pack", "By placing an order with us you will be charged $ __prc__ + $0.00 for S&H for __altnm__ of Eye Vision Supply __prdname__. If you are not completely satisfied with your purchase of Eye Vision Supply __prdname__ at any time, please call (877) 217-9073 or email support@eyevisionsupply.com, Monday-Saturday: 9 am to 5 pm 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 Eye Vision Supply."]; products[212] = ["Eye Glass Holder Strap", 11.49, "Eye Vision Supply", "This eyeglass strap is designed for reliable use and features a secure clip loop that provides a firm grip on all types of glasses. The strap's length can be adjusted for a comfortable fit around the head and neck. Included in the pack are multiple straps in brown colors, along with a bonus item. These straps are built to be durable for long-term use.", "", "5 Pack", "By placing an order with us you will be charged $ __prc__ + $0.00 for S&H for __altnm__ of Eye Vision Supply __prdname__. If you are not completely satisfied with your purchase of Eye Vision Supply __prdname__ at any time, please call (877) 217-9073 or email support@eyevisionsupply.com, Monday-Saturday: 9 am to 5 pm 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 Eye Vision Supply."]; products[213] = ["Multifunctional Eyewear Stand", 17.49, "Eye Vision Supply", "This product is designed to organize and display eyewear. The stand can hold 9 to 12 pairs of glasses and features a 360-degree rotating base for easy access. It also includes an additional tray with soft pads for storing various jewelry items. Made from durable metal with a matte finish, the stand has a modern, minimalist design. It is easy to assemble and has a compact footprint to save space on a desk or counter. The interior of the stand is lined with a soft, non-woven fabric to help protect items from scratches.", "", "", "By placing an order with us you will be charged $ __prc__ + $0.00 for S&H for __altnm__ of Eye Vision Supply __prdname__. If you are not completely satisfied with your purchase of Eye Vision Supply __prdname__ at any time, please call (877) 217-9073 or email support@eyevisionsupply.com, Monday-Saturday: 9 am to 5 pm 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 Eye Vision Supply."]; products[214] = ["Contact Lens Solution", 17.98, "Eye Vision Supply", "This preservative-free saline solution may help maximize comfort and clarity for contact lens wearers, especially those with dry and sensitive eyes. Its pH-balanced formula is designed to mimic your eyes' natural tears, making it gentle for daily use and ideal as an insertion solution for scleral lenses.", "", "", "By placing an order with us you will be charged $ __prc__ + $0.00 for S&H for __altnm__ of Eye Vision Supply __prdname__. If you are not completely satisfied with your purchase of Eye Vision Supply __prdname__ at any time, please call (877) 217-9073 or email support@eyevisionsupply.com, Monday-Saturday: 9 am to 5 pm 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 Eye Vision Supply."]; products[215] = ["Premium Sunglass Organizer", 26.97, "Eye Vision Supply", "This sunglasses organizer is made from a durable MDF frame and is covered with a smooth faux leather material, designed to protect your glasses from scratches. It provides a dedicated place to store and organize eyewear, with eight large compartments that can also hold other items like watches or jewelry. The case has a large glass lid for easy viewing and display of the contents. Its size and design make it suitable for both personal use and retail displays. The organizer comes in a gift box, making it a good choice for a present.", "", "", "By placing an order with us you will be charged $ __prc__ + $0.00 for S&H for __altnm__ of Eye Vision Supply __prdname__. If you are not completely satisfied with your purchase of Eye Vision Supply __prdname__ at any time, please call (877) 217-9073 or email support@eyevisionsupply.com, Monday-Saturday: 9 am to 5 pm 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 Eye Vision Supply."]; products[216] = ["Safety Glass", 34.98, "Eye Vision Supply", "Safety glasses may help protect your eyes from various hazards in many environments. They are crucial for preventing injuries from flying debris, dust, and chemical splashes, significantly reducing the risk of permanent eye damage. Furthermore, specialized safety glasses may help shield your eyes from harmful light radiation, such as intense UV or infrared light. By wearing appropriate safety eyewear, you may help ensure long-term vision health and overall personal safety during hazardous tasks.", "", "Pack Of 2", "By placing an order with us you will be charged $ __prc__ + $0.00 for S&H for __altnm__ of Eye Vision Supply __prdname__. If you are not completely satisfied with your purchase of Eye Vision Supply __prdname__ at any time, please call (877) 217-9073 or email support@eyevisionsupply.com, Monday-Saturday: 9 am to 5 pm 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 Eye Vision Supply."]; products[217] = ["Eye Glass Repair Kit", 35.96, "Eye Vision Supply", "This comprehensive eyeglass and sunglass repair kit may help you with all your repair needs. It includes a variety of tiny screws, washers, nuts, and silicone nose pads, alongside a precision screwdriver bit set with magnetic tips for easy handling. With multiple types and sizes of nose pads, and all components neatly organized in a small, portable case, this kit may help anyone who wears glasses to easily perform repairs at home or on the go.", "", "", "By placing an order with us you will be charged $ __prc__ + $0.00 for S&H for __altnm__ of Eye Vision Supply __prdname__. If you are not completely satisfied with your purchase of Eye Vision Supply __prdname__ at any time, please call (877) 217-9073 or email support@eyevisionsupply.com, Monday-Saturday: 9 am to 5 pm 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 Eye Vision Supply."]; products[228] = ["Hiking Glass", 52.47, "Eye Vision Supply", "These sunglasses are designed for clarity and comfort during any activity. Featuring TAC HD polarized lenses, they may reduce glare and enhance contrast while providing full UVA and UVB protection. The lightweight TR90 frame and wraparound design ensure a secure, close fit, while non-slip rubber nose pads and temple arms prevent sliding during high-intensity movement. Perfect for a wide range of sports and daily wear, these glasses offer all-day comfort and a stylish look.", "", "", "By placing an order with us you will be charged $ __prc__ + $0.00 for S&H for __altnm__ of Eye Vision Supply __prdname__. If you are not completely satisfied with your purchase of Eye Vision Supply __prdname__ at any time, please call (877) 217-9073 or email support@eyevisionsupply.com, Monday-Saturday: 9 am to 5 pm 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 Eye Vision Supply."]; products[229] = ["Swimming Glass", 69.96, "Eye Vision Supply", "This product is designed to provide clear visibility for competitive swimming. The lenses are equipped with an anti-fog technology that can be reactivated by swiping the inner surface with a finger while submerged in water. The goggles feature a low-profile, hydrodynamic design to minimize drag and offer a wide field of vision. They are built for stability during dives, with soft silicone seals for a secure fit. The lenses are made from durable polycarbonate, and the goggles come with five interchangeable nose bridges to ensure a customized fit. They are suitable for indoor and low-light swimming conditions.", "", "", "By placing an order with us you will be charged $ __prc__ + $0.00 for S&H for __altnm__ of Eye Vision Supply __prdname__. If you are not completely satisfied with your purchase of Eye Vision Supply __prdname__ at any time, please call (877) 217-9073 or email support@eyevisionsupply.com, Monday-Saturday: 9 am to 5 pm 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 Eye Vision Supply."]; products[230] = ["Blue Light Blocking Glass", 120.08, "Eye Vision Supply", "Blue light blocking glasses may help reduce eye strain and discomfort that can arise from prolonged exposure to digital screens. By filtering out a portion of the blue light emitted by devices like computers, smartphones, and tablets, these glasses may contribute to a more comfortable viewing experience, especially during evening hours. While individual results can vary, many users report feeling a difference in their eyes after incorporating blue light blocking glasses into their daily routine.", "", "", "By placing an order with us you will be charged $ __prc__ + $0.00 for S&H for __altnm__ of Eye Vision Supply __prdname__. If you are not completely satisfied with your purchase of Eye Vision Supply __prdname__ at any time, please call (877) 217-9073 or email support@eyevisionsupply.com, Monday-Saturday: 9 am to 5 pm 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 Eye Vision Supply."]; products[231] = ["High-End Sunglasses", 99.99, "Eye Vision Supply", "Stay stylish and protected with these classic rectangular polarized sunglasses for men. Designed for comfort and durability, they feature lightweight frames, flexible hinges, and UV-blocking polarized lenses for clear, glare-free vision. Perfect for driving, outdoor adventures, or daily wear, these timeless sunglasses combine fashion, function, and comfort in one sleek design.", "", "Pack Of 3", "By placing an order with us you will be charged $ __prc__ + $0.00 for S&H for __altnm__ of Eye Vision Supply __prdname__. If you are not completely satisfied with your purchase of Eye Vision Supply __prdname__ at any time, please call (877) 217-9073 or email support@eyevisionsupply.com, Monday-Saturday: 9 am to 5 pm 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 Eye Vision Supply."]; products[232] = ["Smart Ski Goggles", 239.94, "Eye Vision Supply", "Experience adventure like never before with 4K Live Streaming Goggles. Capture ultra HD photos and videos, stream live to your phone via the app, and share instantly on social media. Built for durability and performance, these impact-resistant, helmet-compatible goggles provide full UV protection and anti-fog lenses for clear vision in any condition. Rechargeable and expandable up to 128GB, they’re ready for every journey.", "", "", "By placing an order with us you will be charged $ __prc__ + $0.00 for S&H for __altnm__ of Eye Vision Supply __prdname__. If you are not completely satisfied with your purchase of Eye Vision Supply __prdname__ at any time, please call (877) 217-9073 or email support@eyevisionsupply.com, Monday-Saturday: 9 am to 5 pm 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 Eye Vision Supply."]; products[233] = ["Blood Glucose Nourisher", 139.9, "Eye Vision Supply", "The Blood Glucose Nourisher is a natural, plant-based supplement that may help support healthy blood sugar levels. It's designed for those who want to help maintain their energy and metabolic function. This powerful formula may offer long-term support for glucose control and energy balance, and it may assist with overall metabolic wellness. By helping to naturally regulate blood sugar, this supplement may provide comprehensive support for your health over an extended period.", "", "Buy 2 Bottles", ""]; products[234] = ["Blood Glucose Nourisher", 199.8, "Eye Vision Supply", "", "", "Buy 4 Bottles", ""]; products[235] = ["Blood Glucose Nourisher", 299.7, "Eye Vision Supply", "", "", "Buy 6 Bottles", ""]; products[236] = ["Maca Root Capsules", 139.9, "Eye Vision Supply", "Maca Root Capsules may help enhance your energy and vitality by providing a natural way to support stamina and endurance. This supplement may also help maintain a positive mood and promote overall health and wellness. For those with an active lifestyle, Maca Root Capsules may offer sustained energy support and a sense of balance.", "", "Buy 2 Bottles", ""]; products[237] = ["Maca Root Capsules", 199.8, "Eye Vision Supply", "", "", "Buy 4 Bottles", ""]; products[238] = ["Maca Root Capsules", 299.7, "Eye Vision Supply", "", "", "Buy 6 Bottles", ""]; products[239] = ["Ashwagandha Capsules", 139.9, "Eye Vision Supply", "Ashwagandha Capsules may help you discover natural stress relief. This ancient adaptogen may help reduce feelings of anxiety, boost energy, and support mental clarity. Designed for consistent use, this supplement may also help promote better sleep, improve focus, and aid in managing stress for sustained mental and physical balance.", "", "Buy 2 Bottles", ""]; products[240] = ["Ashwagandha Capsules", 199.8, "Eye Vision Supply", "", "", "Buy 4 Bottles", ""]; products[241] = ["Ashwagandha Capsules", 299.7, "Eye Vision Supply", "", "", "Buy 6 Bottles", ""]; products[242] = ["Vitamin C Capsules", 139.9, "Eye Vision Supply", "Our premium Vitamin C Capsules may help boost your immune system with a potent dose of antioxidant-rich vitamin C. This supplement may help support your body’s natural defenses, improve skin health, and fight oxidative stress. Formulated for maximum absorption, each capsule may help promote immunity, collagen production, and healthy energy levels, making it an ideal choice for consistent, long-term wellness support.", "", "Buy 2 Bottles", ""]; products[243] = ["Vitamin C Capsules ", 199.8, "Eye Vision Supply", "", "", "Buy 4 Bottles", ""]; products[244] = ["Vitamin C Capsules ", 299.7, "Eye Vision Supply", "", "", "Buy 6 Bottles", ""]; products[245] = ["Magnesium Capsules", 139.9, "Eye Vision Supply", "Our Magnesium Capsules may help support muscle function, relaxation, and heart health. This supplement may also help reduce stress, ease muscle cramps, and promote more restful sleep. Designed for long-term use, it's a powerful addition to your daily wellness routine that may also help improve nerve function and support cardiovascular wellness.", "", "Buy 2 Bottles", ""]; products[246] = ["Magnesium Capsules", 199.8, "Eye Vision Supply", "", "", "Buy 4 Bottles", ""]; products[247] = ["Magnesium Capsules", 299.7, "Eye Vision Supply", "", "", "Buy 6 Bottles", ""]; products[248] = ["Garcinia Capsules ", 139.9, "Eye Vision Supply", "Our Garcinia Capsules may help support your weight management goals. This supplement features a powerful dose of Garcinia Cambogia, a tropical fruit extract that may help curb appetite, block fat production, and promote metabolic health. Ideal for long-term use, it's designed to provide sustained appetite suppression and energy support, which may help you with your commitment to healthy, natural weight management.", "", "Buy 2 Bottles", ""]; products[249] = ["Garcinia Capsules ", 199.8, "Eye Vision Supply", "", "", "Buy 4 Bottles", ""]; products[250] = ["Garcinia Capsules ", 299.7, "Eye Vision Supply", "", "", "Buy 6 Bottles", ""]; console.log(products); var orderedItems = []; var orderedTotQty = 0; var maxQty = 10; var shipRates = false; var handling = 0; var carturl = "cart.php"; // Function to check item exists in cart var checkItemExists = function(itemId) { var order = $.cookie('order'); if (!order) { return false; } 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) { return true; } } } return false; } //Funtion adds Items to Cart var addItem = function(itemId, Qty, showFullCart) { if (typeof showFullCart === "undefined") { showFullCart = false; } 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(showFullCart, '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, showFullCart) { if (typeof showFullCart === "undefined") { showFullCart = false; } 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(); } $.cookie('order', order); $.cookie('orderedTotQty', orderedTotQty); showCart(true, '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(); }); } $('.trm_1').hide(); showCart(false, 'empty'); }; //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[pid][1]), 2); $('#prow-' + pid + ' .tot-price').html('$' + sub_total.toFixed(2) + ' USD'); $('#prow-' + pid + ' .qtybox').val(quantity); $('#prow-' + pid + ' .dispqty').html(quantity); } 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 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][6]; termTxt = replaceAllStr(termTxt, ' __prc__', products[prodId][1].toFixed(2)); termTxt = replaceAllStr(termTxt, '__pname__', products[prodId][2]); termTxt = replaceAllStr(termTxt, '__prdname__', products[prodId][0]); termTxt = replaceAllStr(termTxt, '__qnty__', products[prodId][5]); term_htm += '' + termTxt + ''; cartHtml += "
" + "
" + "

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

" + "
" + "

" + products[prodId][0] + " " + products[prodId][5] + "

" + "

"+ quantity +"

" + "

$" + 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... '); } var upProdId1 = 217; if(checkItemExists(upProdId1)) { $(".offerBox:eq(0) .sec1-shopnow").text("Added To Order"); $(".offerBox:eq(0) .sec1-shopnow").addClass("prd-added"); $(".offerBox:eq(0) .remove-from-cart").show(); } else { $(".offerBox:eq(0) .sec1-shopnow").text("Add To Order"); $(".offerBox:eq(0) .sec1-shopnow").removeClass("prd-added"); $(".offerBox:eq(0) .remove-from-cart").hide(); } var upProdId2 = 228; if(checkItemExists(upProdId2)) { $(".offerBox:eq(1) .sec1-shopnow").text("Added To Order"); $(".offerBox:eq(1) .sec1-shopnow").addClass("prd-added"); $(".offerBox:eq(1) .remove-from-cart").show(); } else { $(".offerBox:eq(1) .sec1-shopnow").text("Add To Order"); $(".offerBox:eq(1) .remove-from-cart").hide(); $(".offerBox:eq(1) .sec1-shopnow").removeClass("prd-added"); } return false; } }; var round = function(value, decimals) { return Number(Math.round(value + 'e' + decimals) + 'e-' + decimals); };