var products = []; products[211] = ["Elegant Pixie Cut Wig", 29.99, "Radiant Wigs", "Our Elegant Pixie Cut Wig offers a chic and sophisticated look with minimal maintenance. Perfect for those who love short styles, this wig is crafted from high-quality synthetic fibers that mimic the natural texture of human hair, providing a comfortable and breathable fit.", "", 0,"By placing an order with us you will be charged $ __prc__ + $0.00 for S&H for __altnm__ of Radiant Wigs __prdname__. If you are not completely satisfied with your purchase of Radiant Wigs __prdname__ at any time, please call 8558794882 or email support@radiantwigs.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 Radiant Wigs.", ""]; products[212] = ["Classic Bob Wig", 59.99, "Radiant Wigs", "Achieve a timeless look with our Classic Bob Wig, designed to frame your face beautifully. Made from heat-resistant synthetic fibers, this wig is perfect for everyday wear and can be styled with heat tools for added versatility.", "", 0,"By placing an order with us you will be charged $ __prc__ + $0.00 for S&H for __altnm__ of Radiant Wigs __prdname__. If you are not completely satisfied with your purchase of Radiant Wigs __prdname__ at any time, please call 8558794882 or email support@radiantwigs.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 Radiant Wigs.", ""]; products[213] = ["Voluminous Afro Wig", 79.99, "Radiant Wigs", "Our Voluminous Afro Wig is perfect for those who love bold, beautiful curls. This wig is made with premium synthetic fibers that mimic the look and feel of natural hair, offering a full, bouncy look that’s easy to manage and style.", "", 0,"By placing an order with us you will be charged $ __prc__ + $0.00 for S&H for __altnm__ of Radiant Wigs __prdname__. If you are not completely satisfied with your purchase of Radiant Wigs __prdname__ at any time, please call 8558794882 or email support@radiantwigs.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 Radiant Wigs.", ""]; products[214] = ["Curly Lace Front Wig", 129.99, "Radiant Wigs", "Achieve a full and natural look with our Curly Lace Front Wig. The lace front ensures a seamless hairline, while the soft curls add volume and texture to your style. Perfect for both casual and formal occasions.", "", 0,"By placing an order with us you will be charged $ __prc__ + $0.00 for S&H for __altnm__ of Radiant Wigs __prdname__. If you are not completely satisfied with your purchase of Radiant Wigs __prdname__ at any time, please call 8558794882 or email support@radiantwigs.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 Radiant Wigs.", ""]; products[215] = ["Kinky Curly Afro Wig", 189.99, "Radiant Wigs", "Our Kinky Curly Afro Wig is perfect for those who want to rock a bold, natural look. This wig is made from premium synthetic fibers that provide a soft, natural feel and a bouncy, voluminous appearance.", "", 0,"By placing an order with us you will be charged $ __prc__ + $0.00 for S&H for __altnm__ of Radiant Wigs __prdname__. If you are not completely satisfied with your purchase of Radiant Wigs __prdname__ at any time, please call 8558794882 or email support@radiantwigs.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 Radiant Wigs.", ""]; products[216] = ["Straight Human Hair Wig", 239.99, "Radiant Wigs", "Indulge in luxury with our Straight Human Hair Wig. Made from 100% natural human hair, this wig offers a sleek, straight style that can be dyed, cut, and styled just like your own hair. Perfect for those looking for the highest quality in hairpieces.", "", 0,"By placing an order with us you will be charged $ __prc__ + $0.00 for S&H for __altnm__ of Radiant Wigs __prdname__. If you are not completely satisfied with your purchase of Radiant Wigs __prdname__ at any time, please call 8558794882 or email support@radiantwigs.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 Radiant Wigs.", ""]; products[217] = ["Loose Wave Human Hair Wig", 159.99, "Radiant Wigs", "Our Loose Wave Human Hair Wig offers a luxurious and natural look. Made from 100% human hair, this wig can be styled, dyed, and treated just like your own hair, providing versatility and a natural appearance.", "", 0,"By placing an order with us you will be charged $ __prc__ + $0.00 for S&H for __altnm__ of Radiant Wigs __prdname__. If you are not completely satisfied with your purchase of Radiant Wigs __prdname__ at any time, please call 8558794882 or email support@radiantwigs.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 Radiant Wigs.", ""]; products[218] = ["Sleek Bob Human Hair Wig", 99.99, "Radiant Wigs", "The Sleek Bob Human Hair Wig offers a sophisticated and modern style, perfect for both professional and casual wear. Crafted from 100% human hair, this wig provides a natural look and feel with the flexibility to style it your way.", "", 0,"By placing an order with us you will be charged $ __prc__ + $0.00 for S&H for __altnm__ of Radiant Wigs __prdname__. If you are not completely satisfied with your purchase of Radiant Wigs __prdname__ at any time, please call 8558794882 or email support@radiantwigs.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 Radiant Wigs.", ""]; products[219] = ["Lace Front Straight Wig", 199.99, "Radiant Wigs", "Our Lace Front Straight Wig provides a sleek, polished look with a natural hairline. Made from premium synthetic fibers, this wig is designed for long-lasting wear and easy maintenance, making it a perfect choice for daily use or special occasions.", "", 0,"By placing an order with us you will be charged $ __prc__ + $0.00 for S&H for __altnm__ of Radiant Wigs __prdname__. If you are not completely satisfied with your purchase of Radiant Wigs __prdname__ at any time, please call 8558794882 or email support@radiantwigs.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 Radiant Wigs.", ""]; products[220] = ["Body Wave Human Hair Wig", 239.99, "Radiant Wigs", "Experience the luxurious feel of our Body Wave Human Hair Wig. With its soft, flowing waves, this wig offers a glamorous and natural look. Made from 100% human hair, it can be styled, colored, and treated just like your own hair.", "", 0,"By placing an order with us you will be charged $ __prc__ + $0.00 for S&H for __altnm__ of Radiant Wigs __prdname__. If you are not completely satisfied with your purchase of Radiant Wigs __prdname__ at any time, please call 8558794882 or email support@radiantwigs.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 Radiant Wigs.", ""]; products[221] = ["Water Wave Lace Front Wig", 169.99, "Radiant Wigs", "The Water Wave Lace Front Wig features soft, bouncy waves that provide a natural and effortless look. The lace front ensures a realistic hairline, making this wig perfect for anyone seeking a full, voluminous style.", "", 0,"By placing an order with us you will be charged $ __prc__ + $0.00 for S&H for __altnm__ of Radiant Wigs __prdname__. If you are not completely satisfied with your purchase of Radiant Wigs __prdname__ at any time, please call 8558794882 or email support@radiantwigs.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 Radiant Wigs.", ""]; products[222] = ["Healthy Hair Growth Guide eBook", 1.75, "Radiant Wigs", "Unlock the secrets to longer, stronger, and healthier hair with our Healthy Hair Growth Guide. This comprehensive eBook covers everything from diet tips to hair care routines designed to enhance hair growth naturally. Perfect for anyone looking to improve their hair health.", "", 0,"By placing an order with us you will be charged $ __prc__ for __altnm__ of Radiant Wigs __prdname__. If you are not completely satisfied with your purchase of Radiant Wigs __prdname__ at any time, please call 8558794882 or email support@radiantwigs.com, Monday-Saturday: 9 am to 5 pm EST. Your eBook will be delivered instantly upon payment. I agree that my credit card charge will appear as Radiant Wigs.", ""]; products[233] = ["6 Bottles of Keto Supplement", 239.99, "Radiant Wigs", "This keto supplement is designed for those following a ketogenic lifestyle. With a blend of quality ingredients, it fits perfectly into your daily routine. Whether you're just starting keto or maintaining it, these 6 bottles provide a convenient supply.", "", 0,"By placing an order with us you will be charged $ __prc__ + $0.00 for S&H for __altnm__ of Radiant Wigs __prdname__. If you are not completely satisfied with your purchase of Radiant Wigs __prdname__ at any time, please call 8558794882 or email support@radiantwigs.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 Radiant Wigs.", ""]; products[234] = ["4 Bottles of Keto Supplement", 189.99, "Radiant Wigs", "This 4-bottle keto supplement package is ideal for those who are committed to their ketogenic journey. Crafted with care, these supplements are made to complement your low-carb diet and keep you on track.", "", 0,"By placing an order with us you will be charged $ __prc__ + $0.00 for S&H for __altnm__ of Radiant Wigs __prdname__. If you are not completely satisfied with your purchase of Radiant Wigs __prdname__ at any time, please call 8558794882 or email support@radiantwigs.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 Radiant Wigs.", ""]; products[235] = ["2 Bottles of Keto Supplement", 129.99, "Radiant Wigs", "For those who are focused on maintaining their keto diet, these 2 bottles of keto supplement offer a great start. Designed for easy integration into your daily routine, they provide the support you need.", "", 0,"By placing an order with us you will be charged $ __prc__ + $0.00 for S&H for __altnm__ of Radiant Wigs __prdname__. If you are not completely satisfied with your purchase of Radiant Wigs __prdname__ at any time, please call 8558794882 or email support@radiantwigs.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 Radiant Wigs.", ""]; products[236] = ["6 Bottles of Keto Supplement - Monthly Subscription", 239.99, "Radiant Wigs", "Maintain your keto lifestyle effortlessly with our 6-bottle monthly subscription. This convenient package ensures you have a steady supply of keto support without the hassle of reordering.", "", 0,"By placing an order with us you will be charged $ __prc__ + $0.00 for S&H MONTHLY for __altnm__ of Radiant Wigs __prdname__. If you are not completely satisfied with your purchase of Radiant Wigs __prdname__ at any time, please call 8558794882 or email support@radiantwigs.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 Radiant Wigs.", ""]; products[237] = ["4 Bottles of Keto Supplement - Monthly Subscription", 189.99, "Radiant Wigs", "With this 4-bottle monthly subscription, you'll always have the keto supplements you need. This package is designed for convenience and consistency, helping you stay on track with your diet goals.", "", 0,"By placing an order with us you will be charged $ __prc__ + $0.00 for S&H MONTHLY for __altnm__ of Radiant Wigs __prdname__. If you are not completely satisfied with your purchase of Radiant Wigs __prdname__ at any time, please call 8558794882 or email support@radiantwigs.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 Radiant Wigs.", ""]; products[238] = ["2 Bottles of Keto Supplement - Monthly Subscription", 129.99, "Radiant Wigs", "Simplify your routine with our 2-bottle keto supplement subscription. Delivered monthly, this package is perfect for maintaining your ketogenic lifestyle with minimal effort.", "", 0,"By placing an order with us you will be charged $ __prc__ + $0.00 for S&H MONTHLY for __altnm__ of Radiant Wigs __prdname__. If you are not completely satisfied with your purchase of Radiant Wigs __prdname__ at any time, please call 8558794882 or email support@radiantwigs.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 Radiant Wigs.", ""]; products[239] = ["2 Bottles of Detox Supplement", 59.99, "Radiant Wigs", "Our Detox Supplement is formulated to support your body's natural detoxification process. With a blend of carefully selected ingredients, this supplement is designed to be a convenient addition to your wellness routine, helping you feel refreshed and rejuvenated. This 2-bottle package provides a convenient supply for regular use.", "", 0,"By placing an order with us you will be charged $ __prc__ + $0.00 for S&H for __altnm__ of Radiant Wigs __prdname__. If you are not completely satisfied with your purchase of Radiant Wigs __prdname__ at any time, please call 8558794882 or email support@radiantwigs.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 Radiant Wigs.", ""]; 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); 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 += "
ProductPrice Qty.Total
"; 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) + products[prodId][5]; total += sub_total ; termTxt = products[prodId][6]; termTxt = replaceAllStr(termTxt, ' __prc__', products[prodId][1].toFixed(2)); termTxt = replaceAllStr(termTxt, '__prdname__', products[prodId][0]); termTxt = replaceAllStr(termTxt, '__altnm__', products[prodId][7]); term_htm += '' + termTxt + ''; cartHtml += "
" + "
" + "

" + products[prodId][4] + " " + products[prodId][0] + " " + products[prodId][7] + "

" + "
" + "" + "" + "
$" + (products[prodId][1]).toFixed(2) + "
" + "
" + quantity + "
" + "
$" + sub_total.toFixed(2) + "
" + "
" } } cartHtml += ""; cartHtml += "
" +"
" +"" +"
" +"
"; cartHtml += "
" +"Continue Shopping Empty Cart Proceed To Checkout
" +"
"; cartHtml += "

" +"
" +"" +"" +"Remove" +"
"; cartHtml += "
"; cartHtml += "
" +"
" +"" +"" +"Remove" +"
"; cartHtml += "
"; cartHtml += "
"; if (cartHtml != "") { $("#cartBox").html(cartHtml); $(".trm_1").html(term_htm); } else { $("#cartBox").html(" Loading..."); } var upProdId1 = 217; if(checkItemExists(upProdId1)) { $(".offerBox:eq(0) .sec1-shopnow").text("Added To Order"); $(".offerBox:eq(0) .remove-from-cart").show(); } else { $(".offerBox:eq(0) .sec1-shopnow").text("Yes! Upgrade Now"); $(".offerBox:eq(0) .remove-from-cart").hide(); } var upProdId2 = 218; if(checkItemExists(upProdId2)) { $(".offerBox:eq(1) .sec1-shopnow").text("Added To Order"); $(".offerBox:eq(1) .remove-from-cart").show(); } else { $(".offerBox:eq(1) .sec1-shopnow").text("Yes! Upgrade Now"); $(".offerBox:eq(1) .remove-from-cart").hide(); } return false; } }; var round = function(value, decimals) { return Number(Math.round(value + 'e' + decimals) + 'e-' + decimals); };