var products = [];
products[211] = ["Microfiber Cleaning Cloths", 8.99, "Bold Vision Shop", "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 Bold Vision Shop __prdname__. If you are not completely satisfied with your purchase of Bold Vision Shop __prdname__ at any time, please call (888) 264-3657 or email support@boldvisionshop.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 Bold Vision Shop."];
products[212] = ["Eye Glass Holder Strap", 11.49, "Bold Vision Shop", "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 Bold Vision Shop __prdname__. If you are not completely satisfied with your purchase of Bold Vision Shop __prdname__ at any time, please call (888) 264-3657 or email support@boldvisionshop.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 Bold Vision Shop."];
products[213] = ["Multifunctional Eyewear Stand", 17.49, "Bold Vision Shop", "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 Bold Vision Shop __prdname__. If you are not completely satisfied with your purchase of Bold Vision Shop __prdname__ at any time, please call (888) 264-3657 or email support@boldvisionshop.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 Bold Vision Shop."];
products[214] = ["Contact Lens Solution", 17.98, "Bold Vision Shop", "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 Bold Vision Shop __prdname__. If you are not completely satisfied with your purchase of Bold Vision Shop __prdname__ at any time, please call (888) 264-3657 or email support@boldvisionshop.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 Bold Vision Shop."];
products[215] = ["Premium Sunglass Organizer", 26.97, "Bold Vision Shop", "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 Bold Vision Shop __prdname__. If you are not completely satisfied with your purchase of Bold Vision Shop __prdname__ at any time, please call (888) 264-3657 or email support@boldvisionshop.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 Bold Vision Shop."];
products[216] = ["Safety Glass", 34.98, "Bold Vision Shop", "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 Bold Vision Shop __prdname__. If you are not completely satisfied with your purchase of Bold Vision Shop __prdname__ at any time, please call (888) 264-3657 or email support@boldvisionshop.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 Bold Vision Shop."];
products[217] = ["Eye Glass Repair Kit", 35.96, "Bold Vision Shop", "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 Bold Vision Shop __prdname__. If you are not completely satisfied with your purchase of Bold Vision Shop __prdname__ at any time, please call (888) 264-3657 or email support@boldvisionshop.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 Bold Vision Shop."];
products[228] = ["Hiking Glass", 52.47, "Bold Vision Shop", "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 Bold Vision Shop __prdname__. If you are not completely satisfied with your purchase of Bold Vision Shop __prdname__ at any time, please call (888) 264-3657 or email support@boldvisionshop.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 Bold Vision Shop."];
products[229] = ["Swimming Glass", 69.96, "Bold Vision Shop", "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 Bold Vision Shop __prdname__. If you are not completely satisfied with your purchase of Bold Vision Shop __prdname__ at any time, please call (888) 264-3657 or email support@boldvisionshop.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 Bold Vision Shop."];
products[230] = ["Blue Light Blocking Glass", 120.08, "Bold Vision Shop", "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 Bold Vision Shop __prdname__. If you are not completely satisfied with your purchase of Bold Vision Shop __prdname__ at any time, please call (888) 264-3657 or email support@boldvisionshop.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 Bold Vision Shop."];
products[231] = ["High-End Sunglasses", 99.99, "Bold Vision Shop", "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 Bold Vision Shop __prdname__. If you are not completely satisfied with your purchase of Bold Vision Shop __prdname__ at any time, please call (888) 264-3657 or email support@boldvisionshop.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 Bold Vision Shop."];
products[232] = ["Smart Ski Goggles", 239.94, "Bold Vision Shop", "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 Bold Vision Shop __prdname__. If you are not completely satisfied with your purchase of Bold Vision Shop __prdname__ at any time, please call (888) 264-3657 or email support@boldvisionshop.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 Bold Vision Shop."];
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 += "" + products[prodId][4] + " "+ quantity +"
" + "" + products[prodId][0] + " " + products[prodId][5] + "
" + ""+ quantity +"
" + " $" + sub_total.toFixed(2) + " 