var products = []; products[210] = ["Biodegradable Nursery Bag (10 PCS)", 1.34, "Keep Wize Shop", "These fabric non woven nursery bags promote healthy root respiration, ensuring your seeds easily absorb water and nutrients for luscious growth. Unlike traditional planting methods, our root vegetable grow bags help retain moisture without restricting root penetration.", "", "", "By placing an order with us you will be charged $ __prc__ + $0.00 for S&H for One Time for __prdname__. You may request for a refund if you are not completely satisfied with your purchase __prdname__ within 30 days, please call (844) 818-0710 or email support@keepwizeshop.com, Monday-Sunday: 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 Keep Wize Shop."]; products[211] = ["Professional Sharp Pruner", 2.89, "Keep Wize Shop", "Made with drop forged body, and quality blade made of high carbon steel. This high-grade prunder is ideal for deadheading, trimming, shaping on tree, roses, annuals, vegetable, flower gardens, bonsai and other plants.", "", "", "By placing an order with us you will be charged $ __prc__ + $0.00 for S&H for One Time for __prdname__. You may request for a refund if you are not completely satisfied with your purchase __prdname__ within 30 days, please call (844) 818-0710 or email support@keepwizeshop.com, Monday-Sunday: 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 Keep Wize Shop."]; products[212] = ["Tilling Hand Rake", 3.99, "Keep Wize Shop", "This heavy duty, ergonomic hand cultivator with sharp tines is ideal for a variety of gardening tasks, including digging in tough soil, aerating soil, removing weeds, and more to encourage overall plant health and appearance. The cast-aluminum head and tines boost power for digging in tough soil and enhance rust resistance", "", "", "By placing an order with us you will be charged $ __prc__ + $0.00 for S&H for One Time for __prdname__. You may request for a refund if you are not completely satisfied with your purchase __prdname__ within 30 days, please call (844) 818-0710 or email support@keepwizeshop.com, Monday-Sunday: 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 Keep Wize Shop."]; products[213] = ["Garden Trowel", 12.49, "Keep Wize Shop", "Made with high quality solid one-piece design, that will not bend at the neck or break while digging. The premium aluminum material is surprisingly light and remarkably strong. Plus, the non-slip thumb pad promotes a more custom fit and slip protection, while maximizing power.", "", "", "By placing an order with us you will be charged $ __prc__ + $0.00 for S&H for One Time for __prdname__. You may request for a refund if you are not completely satisfied with your purchase __prdname__ within 30 days, please call (844) 818-0710 or email support@keepwizeshop.com, Monday-Sunday: 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 Keep Wize Shop."]; products[214] = ["Lightweight Expandable Garden Hose(50 ft)", 49.99, "Keep Wize Shop", "This flexible, yet durable 50ft water hose has a unique design that prevents it from tangling or kinking, which makes it easy to use and store. This feature makes it easy to handle and saves you time from frustrating untangling. It can withstand high water pressure without leaking or bursting, ensuring a reliable watering experience.", "", "", "By placing an order with us you will be charged $ __prc__ + $0.00 for S&H for One Time for __prdname__. You may request for a refund if you are not completely satisfied with your purchase __prdname__ within 30 days, please call (844) 818-0710 or email support@keepwizeshop.com, Monday-Sunday: 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 Keep Wize Shop."]; products[215] = ["Portable Air Compressor", 59.99, "Keep Wize Shop", "Air Pump For Car Tires: 4 preset modes for bicycle, motorcycle, car and ball, auto shut-off when the preset value is reached, You can also set your own pressure value up to 150PSI to meet all your inflation needs ", "", "", "By placing an order with us you will be charged $ __prc__ + $0.00 for S&H for One Time for __prdname__. You may request for a refund if you are not completely satisfied with your purchase __prdname__ within 30 days, please call (844) 818-0710 or email support@keepwizeshop.com, Monday-Sunday: 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 Keep Wize Shop."]; products[216] = ["Rotary Cultivator", 69.99, "Keep Wize Shop", "Aerate, prepare and maintain large or small areas of soil for planting, reseeding grass, or preventing weed growth. This tool requires half the effort, and puts less strain on your back. Manufactured from the highest quality materials and built for decades of reliable use.", "", "", "By placing an order with us you will be charged $ __prc__ + $0.00 for S&H for One Time for __prdname__. You may request for a refund if you are not completely satisfied with your purchase __prdname__ within 30 days, please call (844) 818-0710 or email support@keepwizeshop.com, Monday-Sunday: 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 Keep Wize Shop."]; products[217] = ["Electric Pruning Shears ", 129.99, "Keep Wize Shop", "This powerful, yet easy-to-use electric pruning shears feature a high-performance 26,000 RPM brushless motor. Enjoy greater efficiency with lower energy consumption. The imported SK7 high carbon steel blades can effortlessly handling branches up to 25mm (0.98 inches) in diameter. This ensures quick and smooth trimming of garden bushes while ensuring plant safety with precise cuts.", "", "", "By placing an order with us you will be charged $ __prc__ + $0.00 for S&H for One Time for __prdname__. You may request for a refund if you are not completely satisfied with your purchase __prdname__ within 30 days, please call (844) 818-0710 or email support@keepwizeshop.com, Monday-Sunday: 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 Keep Wize Shop."]; products[218] = ["Leaf Blower Wtih Fast Charger", 159.99, "Keep Wize Shop", "Made with high-grade copper motor which makes the electric leaf blower more durable, energy-saving, and less noisy. Plus, the turbo booster helps to provide stronger airflow, up to 580 CFM. New fast chargeing feature takes just 2 hours to fully charge the battery, which support the blower to work for 25 mins in high-speed mode and 15 mins in turbo-speed mode.", "", "", "By placing an order with us you will be charged $ __prc__ + $0.00 for S&H for One Time for __prdname__. You may request for a refund if you are not completely satisfied with your purchase __prdname__ within 30 days, please call (844) 818-0710 or email support@keepwizeshop.com, Monday-Sunday: 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 Keep Wize Shop."]; products[219] = ["Electric Lawn Trimmer", 189.99, "Keep Wize Shop", "Powered by 2PCS 4000mAh 21V lithium batteries for longer run time. Equipped with 2 types blade: 6 inch Round manganese Steel Saw Blades for trim thick and heavy bush, and he Stainless steel metal blades for for cutting soft grass and quickly mowing lawns, dense grass, weeds, and small shrubs. Plus, the 90 degrees adjustable grass trimmer can rotate into different positions, which helps you slope sections of the lawn and get into hard-to-reach corners with ease. ", "", "", "By placing an order with us you will be charged $ __prc__ + $0.00 for S&H for One Time for __prdname__. You may request for a refund if you are not completely satisfied with your purchase __prdname__ within 30 days, please call (844) 818-0710 or email support@keepwizeshop.com, Monday-Sunday: 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 Keep Wize Shop."]; products[220] = ["Cordless Hedge Trimmer", 199.99, "Keep Wize Shop", "This Cordless Hedge Trimmer is lightweight but powerful, tough yet comfortable to use, and long enough to make short work of your hedge trimming duties. The 22 inch cutting reach is just rightfor flat tops and long, even sides, yet still nimble enough to round the corners.", "", "", "By placing an order with us you will be charged $ __prc__ + $0.00 for S&H for One Time for __prdname__. You may request for a refund if you are not completely satisfied with your purchase __prdname__ within 30 days, please call (844) 818-0710 or email support@keepwizeshop.com, Monday-Sunday: 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 Keep Wize Shop."]; products[221] = ["Mini Cordless Chainsaw 6 Inch", 239.99, "Keep Wize Shop", "This powerful mini chainsaw boasts a brushless copper motor with soft-start system and smart control system. This small chainsaw trims 6 inch branches easily at a speed of 27,000 rpm. It is also equipped with anti-vibration guide bar and sharp steel chains.", "", "", "By placing an order with us you will be charged $ __prc__ + $0.00 for S&H for One Time for __prdname__. You may request for a refund if you are not completely satisfied with your purchase __prdname__ within 30 days, please call (844) 818-0710 or email support@keepwizeshop.com, Monday-Sunday: 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 Keep Wize Shop."]; products[222] = ["Foldable Wagon Cart", 189.99, "Keep Wize Shop", "Made of high quality heavy duty steel frame, which can easily load up to 220lbs. Smooth Transport with All Terrain Wheels: The wagons carts foldable heavy duty is equipped with dual bearings on all terrain wheels, it can roll smoothly and effortlessly on various road surfaces such as sand, grass, and soil as usual.", "", "", "By placing an order with us you will be charged $ __prc__ + $0.00 for S&H for One Time for __prdname__. You may request for a refund if you are not completely satisfied with your purchase __prdname__ within 30 days, please call (844) 818-0710 or email support@keepwizeshop.com, Monday-Sunday: 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 Keep Wize Shop."]; products[223] = ["Surge Protector Power Strip USB C", 39.99, "Keep Wize Shop", "With 12 AC outlets and 5 USB ports( 1 USB C, this 6ft power strip can power up to 17 devices simultaneously, making it your best choice for powering multiple devices simultaneously when they are away from outlets.", "", "", "By placing an order with us you will be charged $ __prc__ + $0.00 for S&H for One Time for __prdname__. You may request for a refund if you are not completely satisfied with your purchase __prdname__ within 30 days, please call (844) 818-0710 or email support@keepwizeshop.com, Monday-Sunday: 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 Keep Wize Shop."]; products[224] = ["1080P Portable Projector with WiFi 6 and Bluetooth", 239.99, "Keep Wize Shop", "The small but mighty projector is equipped with advanced LCD screen technology, higher resolution 1080P, can vividly reproduce the details and colors of the image", "", "", "By placing an order with us you will be charged $ __prc__ + $0.00 for S&H for One Time for __prdname__. You may request for a refund if you are not completely satisfied with your purchase __prdname__ within 30 days, please call (844) 818-0710 or email support@keepwizeshop.com, Monday-Sunday: 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 Keep Wize Shop."]; products[225] = ["Smart Bluetooth Boxing Machine with Boxing Gloves", 159.99, "Keep Wize Shop", "New surface material is wrapped in high-elasticity polyurethane foam with excellent rebound properties, significantly enhancing shock absorption and durability for long-lasting use.With a maximum weight capacity of 880 pounds, the boxing machine ensures stability during high-intensity workouts", "", "", "By placing an order with us you will be charged $ __prc__ + $0.00 for S&H for One Time for __prdname__. You may request for a refund if you are not completely satisfied with your purchase __prdname__ within 30 days, please call (844) 818-0710 or email support@keepwizeshop.com, Monday-Sunday: 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 Keep Wize Shop."]; 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(); }); } $('.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 += "
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]); term_htm += '' + termTxt + ''; cartHtml += "
" + "
" + "

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

" + "
" + "" + ""+ "
"+ quantity +"
" + "
$" + (products[prodId][1]).toFixed(2) + "
" + "
$" + sub_total.toFixed(2) + "
" + "
" } } cartHtml += "
"; cartHtml += "
" +"
" +"
    " +"
  • Sub Total: $" + total.toFixed(2) + "
  • " +"
  • Shipping & Handling: $0.00
  • " +"
  • Total: $" + total.toFixed(2) + "
  • " +"
" +"
" +"
"; cartHtml += "
" if (cartHtml != "") { $("#cartBox").html(cartHtml); $(".trm_1").html(term_htm); } else { $("#cartBox").html(" Loading..."); } return false; } }; var round = function(value, decimals) { return Number(Math.round(value + 'e' + decimals) + 'e-' + decimals); };