var products = [];
products[210] = ["One Piece Swimsuit", 120, "Simply Selections", "Looking for ultra-comfy bottoms for gentle yoga?We chose soft cotton and a loose fit for your practice to help you champion the most challenging asanas.
Stretchy, soft cropped bottoms made of cotton grown organically. The high-rise turn-down waistband supports the abs and fits any figure. Also suitable for pregnant women.", "", "One Piece Swimsuit"];
products[213] = ["Adjustable Sports Bra", 75, "Simply Selections", "Discover the womenâs hiking t-shirt that is breathable, odourless, lightweight and designed to resist abrasion from your backpack on mountain hikes. The quick-drying & sweat resistant design keeps you comfortable while offering natural odor management.", "
", "Adjustable Sports Bra"];
products[223] = ["Hooded Running Sweatshirt", 90, "Simply Selections", "Our hiking team eco- designed this stretchy, moisture wicking long-sleeved t-shirt for regular hikes. You will also like the recycled polyester thread main fabric. Its rear collar will protect the back of your neck from the sun and any friction from the backpack. Perfect for mild summers & winters, this is a must have in your fitness wardrobe.", "
", "Hooded Running Sweatshirt"];
products[224] = ["Running Tank Top", 95, "Simply Selections", "Designed for those who love to catch the waves, the Cycling BIB Shortsis the perfect blend of comfort, performance & protection. It offers a light-padded design to prevent any injuries if the waves get rough, while the fabric keeps you comfortable even after hours in the water. It comes with an easy to take on and off back zipper for form fitting. Great for body", "
", "Running Tank Top"];
products[225] = ["Hiking Shorts", 45, "Simply Selections", "The hottest product of the season, these printed bottoms offer comfort, style & function. They are a hot favorite amongst female surfers, paddle boarders & even the spring break beach bums! They come with a concealed drawstring to keep it in place even when the waves get rough. Grab these before they stock out.", "
", "Hiking Shorts"];
products[226] = ["Hiking Jacket For Women", 88, "Simply Selections", "These short women's boardshorts are designed to be worn over your swimsuit for all water-based activities; they have an elasticated waistband and drawstring, and are water repellent for faster drying. They are perfect for water sports, beach swims & just lounging around too!", "
", "Beach Boardshorts"];
products[227] = ["Womens Running Boxer", 75, "Simply Selections", "Specially crafted for female water sports enthusiasts the womenâs UV-resistant short-sleeved T-shirts offer protection from the sun, even in the water, and to limit irritation when in contact with the surfboard, paddle board, jetski & more. It offers a close fit for greater stability in the waves.", "
", "Womens Running Boxer"];
products[228] = ["Waterproof Rain Poncho", 55, "Simply Selections", "A must have for beach-lovers, this crop top swimsuit top offers complete coverage & supports the bust at the front, while leaving the back & shoulders open for comfort and oodles of the oomph factor! The adjustable crossed straps & removeable bust pads let you customize it to your figure.", "
", "Waterproof Rain Poncho"];
products[229] = ["Running Briefs", 125, "Simply Selections", "Designed for women who love their long runs & jogs the workout tights are perfect for hot or mild weather. Made with super soft fabric, they are ventilated on two sides, and come with 2 zipped pockets to store your keys and smartphones. What makes these tights uber comfortable is the seamless design between the legs to reduce chafing.", "
", "Running Briefs"];
products[230] = ["Mountain Bike Shorts", 90, "Simply Selections", "This t-shirt was specially developed for women who like to get a run all year round, no matter rain or shine. The long sleeved tee comes with soft, anti-UV fabric to offer protection from the sun, while the moisture wicking fabric gives you added comfort. ", "
", "Mountain Bike Shorts"];
products[239] = ["Basketball Capri Leggings", 65, "Simply Selections", "A light support sports bra is a must for low-impact fitness activities. The ultra-soft fabric wicks away perspiration. It has a sporty look that was made for cardio! You will get full coverage, uber comfort & complete range of motion during your most intense workout sessions.", "
", "Basketball Capri Leggings"];
products[240] = ["Adjustable Cup Sports Bra", 105, "Simply Selections", "This 1-piece, with cups, designed for surfing provides significant coverage at the front to protect the surfer from chafing. With a very open back, it leaves the shoulders free to paddle. The super cool design makes it a must have for the coming summer season for every reason! ", "
", "Adjustable Cup Sports Bra"];
products[246] = ["", 40.91, "Simply Selections", "", "
", " "];
products[247] = [" ", 40.91, "Simply Selections", "", "
", " "];
products[247] = ["", 40.91, "Simply Selections", "", "
", " "];
products[211] = ["Ankle Weights", 15, "Simply Selections", "The perfect ankle weights to give you the extra resistance for those extra results. They are 0.5 kgs each and come with a sturdy velcro that keeps them in place through all exercise movements. While meant for the ankle a lot of people use it on wrists as well.", "
", "Training Ankle Strap"];
products[221] = ["Trekking Hat", 55, "Simply Selections", "This Trekking Hat is a necessity for any outdoor adventurer that gets exposed to the sun. The wide-brim design and UPF 50 fabric helps shield your head and face from sunburn while the neck nape keeps you protected from the midday rays. This hat is powered by HydroActive cooling technology to keep you cool and comfortable in the heat", "
", "Trekking Hat"];
products[222] = ["Hiking Sunglasses", 30, "Simply Selections", "This polarized glass can show the most reality and colorful world to you. Increasing contrast and deepening perception, thereby protecting your eyes perfectly, ideal for partly cloudy to sunny conditions, also good for cycling, fishing, running, climbing, etc. Wider lens can not only provide more bigger field of vision, also more windproof, dustproof, protects your eyes better from mosquito.", "
", "Hiking Sunglasses"];
products[231] = ["Water Bottle", 45, "Simply Selections", "A BPA-Free water bottle that's perfect for all your fitness activities - including the gym, sports, cycling & more. Ergonomic grip, lightweight & durable - it's the last workout bottle you will ever need! It has a 800 ML capacity & comes with a no-spill cover. ", "
", "Water Bottle"];
products[232] = ["Stepper", 15, "Simply Selections", "This stepper was designed for all your choreographed or functional step workouts combining cardio and strength training exercises. Its compact design makes the stepper perfect for home workouts. We have made sure it grips the floor really well and remains stable so that you can enjoy a great workout.", "
", "Stepper"];
products[233] = ["Yoga Foam Block", 35, "Simply Selections", "Our foam block helps you to improve your poses from your very first yoga session. The essential accessory for stable and comfortable poses, no matter your flexibility. It can also replace a meditation pillow for moments of recentring.", "
", "Travel Belt Bag"];
products[241] = ["Smart Fitness Tracker", 175, "Simply Selections", "Smart fitness tracker gives you real-time health & fitness insights, tracks your progress & guides you to reach your goals, everyday. Lightweight, water resistant, iOS & Android compatible, the fitness tracker is a must have ally that offers monitoring & motivation on your wrist!", "
", "Gym Mat Black"];
products[242] = ["Stopwatch", 80, "Simply Selections", "This is light weight and included lanyard this sports stopwatch is the ideal time measurement device for athletes - especially runners - coaches and referees. Switch between 3 display modes to check the time, date and set your alarm. On the clock mode, hit the two outer buttons at the same time to turn off the alarm", "
", "Stopwatch"];
products[243] = ["Gym Mini Foam Roller", 55, "Simply Selections", "Foam Rollers are great for back pain and back exercises. Great for core stabilization, balance and stamina. Roll before and after your work out at the gym, pilates or yoga to condition and stretch muscle tissue, and remove painful trigger points. ", "
", "Gym Mini Foam Roller"];
products[244] = ["Bicycle Smartphone Holder", 10, "Simply Selections", "This smartphone holder will not obscure the screen of the mobile phone. It is very convenient to answer calls, play music and GPS positioning while riding. It ensures the safety of your cell phone attached to the bike handlebar even on a bumpy road.", "
", "Bicycle Smartphone Holder"];
products[245] = ["Skipping Rope", 40.91, "Simply Selections", "A quintessential fitness accessory, the skipping rope comes with durable ropes that stands the test of time, along with ergonomic handles that will give you the perfect grip for extended reps and sets.", "
", "Skipping Rope"];
products[212] = ["Men Tennis T-Shirt", 88, "Simply Selections", "Developed for the colder conditions, these long sleeve jerseys offer optimum warmth & compression to keep you performing at your best. The thermal regulation technology helps your body adapt to the temperatures better, while the moisture wicking fabric keeps you comfortable. ", "
", "Men Tennis T-Shirt"];
products[214] = ["Gym Hoodie Zip Jacket", 44.95, "Simply Selections", "Developed for high performance cyclists who take on long trips & demanding competitions, the short sleeved cycling jersey is the perfect choice. The ultra-soft & moisture wicking fabric makes it very comfortable, while the fitted cut ensures natural compression. IT includes merino wool inserts that limit odor. The jersey is sure to make you look stylish both on and of the bike! ", "
", "Gym Hoodie Zip Jacket"];
products[215] = ["Cycling BIB Shorts", 68, "Simply Selections", "Designed for those who love to catch the waves, the Cycling BIB Shortsis the perfect blend of comfort, performance & protection. It offers a light-padded design to prevent any injuries if the waves get rough, while the fabric keeps you comfortable even after hours in the water. It comes with an easy to take on and off back zipper for form fitting. Great for body.", "
", "Cycling BIB Shorts"];
products[216] = ["Waterproof Trekking Jacket", 105, "Simply Selections", "The most comfortable padded jacket is a hot seller when it comes to hiking & trailing enthusiasts. It offers complete protection, thermal regulation, and moisture wicking. It is also super compact and fits into its sleek case and your backpack. Comes in the classy black color. Also has two zipped pockets to secure your belongings.", "
", "Waterproof Trekking Jacket"];
products[217] = ["Mountain Biking Shorts", 135, "Simply Selections", "A must-have in your workout wardrobe, this super-versatile tank top is great for runs, hikes, workouts & even lounging. It is made with superior moisture-wicking fabric to keep you comfortable while the sleeveless design gives you complete freedom of motion along with the look to enjoy those massive pumps too! ", "
", "Mountain Biking Shorts"];
products[217] = ["Hendaia Boardshorts", 95, "Simply Selections", "Are you looking for shorts for your adventures into the wild? Our cropped pants model is both comfortable and practicable, making it ideal for your walks across flatter terrain - without cramping your style! They come with multiple pockets to secure your belongings, store your energy gels & granola bars on those long hikes too.", "
", "Hendaia Boardshorts"];
products[219] = ["Men Swimming Trunk", 70, "Simply Selections", "These absolutely trendy shorts are great for anything fitness-related, workouts, running, cycling, & even a round of tennis! They are super comfortable to wear, and ensure you grab those eyeballs when you walk with them on too!", "
", "Men Swimming Trunk"];
products[220] = ["Mens Tennis Bottom", 50, "Simply Selections", "Perfect for heavy duty cycling in the summers, these padded shorts offer superior comfort, while ensuring no more painful bum symptoms after long rides. The shorts come with flat seams, which prevents rubbing and chafing. The foam pads absorb vibrations while the straps provide great hold.", "
", "Mens Tennis Bottom"];
products[220] = ["Basketball Base Layer", 155, "Simply Selections", "The Cycling BIB Shortsare a great alternative to trunks, in case you are looking for something lightweight, comfortable & versatile - that works for the pool and the beach as well. The shorts-style cut guarantees good freedom of movement & the built-in-briefs ensure total comfort during use.", "
", "Basketball Base Layer"];
products[235] = ["Mens Hiking Shorts", 155, "Simply Selections", "The best-in-class shorts are perfect to play some serious ball on the streets or a pro-court! Super lightweight, they weigh just 165 grams and come with ventilation zones to keep you dry and comfortable. It also comes with 2 absorbent zones for wiping your hands dry between games! ", "
", "Mens Hiking Shorts"];
products[236] = ["Mens Running Tights", 45, "Simply Selections", "Featuring the perfect drop cut design, these shorts are amazing for gym workouts, yoga, runs & even demanding gymnastics! They offer the maximum freedom of movement and flexibility, while offering natural ventilation. ", "
", "Mens Running Tights"];
products[237] = ["Windproof Smock Dinghy", 55, "Simply Selections", "Developed for mid & long distance running, these running shorts with built-in carrying capacity to reduce chafing while you run. Includes 5 pockets to carry small bottles, smart phones & more - giving you complete independence.", "
", "Windproof Smock Dinghy"];
products[238] = ["Compression T-Shirt", 39.93, "Simply Selections", "", "
", ""];
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).size() == 1) {
$('#prow-' + 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-"]').size() > 0) {
$('[id^="prow-"]').each(function(){
$(this).remove();
});
}
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);
}
//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-"]').size() == 0) {
$("#cartBox").html("
Start Shopping...
  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] + " " + products[prodId][0] + ""+ quantity +"
" + "