' + getStoreModalLinkHTML() + '
') return(html.join('')) } for (var x = 0; x < skuJson.length; x++) { var _skuData = skuJson[x]; var _skuId = _skuData.skuId; var storeOffersPickup = (json.storeHasBOPIS || json.storeHasSTS); var itemCanBePickedUp = (_skuData.storePickup.display || _skuData.shipToStore.display); var purchaseable = false; if (skuId == _skuId) { var html = []; if (_skuData.preOrder) { $content.append(html.join('')) togglePDPButtons(true); break; } if (_skuData.shipToHome.display) { var stockAmount = parseInt(_skuData.shipToHome.stockAmount); html.push(''); if (stockAmount > 0) { purchaseable = true; html.push('
Available for Ship to Home
'); html.push('
'); html.push('
'); html.push('
Ships in 7-10 business days.
Items larger than 50 in. and/or weighing more than 75 lbs can take up to 4 weeks for delivery
Click here for more information
'); html.push('
'); html.push('
'); if(defaultchecked){ checked = ''; }else{ checked = 'checked="true"'; setChecked('sth'); defaultchecked = true; } html.push('
' + ' Ship to Home
'); html.push('
'); html.push('
'); } else if (_skuData.backOrder) { purchaseable = true; html.push('
Ship to Home: Backordered
'); if(defaultchecked){ checked = ''; }else{ checked = 'checked="true"'; setChecked('sth'); defaultchecked = true; } if(_skuData.storePickup.otherStoresPickupAvailable){ html.push('
' + ' Ship to Home
'); } } else { html.push('
Not Available for Ship to Home
'); } html.push('
'); html.push('
In-store Pickup
'); html.push('
Please Login to Select a Store
'); html.push('
'); html.push('
Eligible for Pickup
'); html.push('
'); html.push('
'); html.push('
'); if (_skuData.storePickup.slaMessage) { html.push(_skuData.storePickup.slaMessage); } html.push('
'); html.push('
'); if (selectedQty > stockAmount) { isPartiallyAvailableInStore = true; } html.push('' + stockAmount + ' in stock at your store '); html.push('
'); html.push('
'); html.push('
'); html.push('
'); if(defaultchecked){ checked = ''; }else{ checked = 'checked="true"'; setChecked(_skuData.storePickup.storeId); defaultchecked = true; } html.push('
' + ' Pickup at this Location
'); html.push('
'); html.push('
'); html.push('
'); html.push('
Pickup Not Currently Available At Your Store
'); html.push('
' + getStoreModalLinkHTML() + '
'); html.push('
'); html.push('
In Stock at Locations Near your Store
'); var count = 0; for (var x = 0; x < _skuData.storePickup.otherStoresPickup.length; x++) { var distance = _skuData.storePickup.otherStoresPickup[x].storeDistance; var stockLevel = parseInt(_skuData.storePickup.otherStoresPickup[x].stockAmount); html.push('
'); html.push('
'); html.push('
'); if (_skuData.storePickup.otherStoresPickup[x].slaMessage) { html.push(_skuData.storePickup.otherStoresPickup[x].slaMessage); } html.push('
'); html.push('
' + _skuData.storePickup.otherStoresPickup[x].storeName + '
'); html.push('
(' + distance + ' miles from your store)
'); html.push('' + stockLevel + ' in stock at this store '); html.push('
') html.push('
') html.push('
'); if(defaultchecked){ checked = ''; }else{ checked = 'checked="true"'; setChecked(_skuData.storePickup.otherStoresPickup[x].storeId); defaultchecked = true; } html.push('
' + ' Pickup at this Location
'); html.push('
'); html.push('
'); if(count < (_skuData.storePickup.otherStoresPickup.length-1)){ html.push('
'); } count++; } html.push('
'); html.push('
In Stock at Locations Near your Store
'); var count = 0; for (var x = 0; x < _skuData.storePickup.otherStoresPickup.length; x++) { var distance = _skuData.storePickup.otherStoresPickup[x].storeDistance; var stockLevel = parseInt(_skuData.storePickup.otherStoresPickup[x].stockAmount); html.push('
'); html.push('
'); html.push('
'); if (_skuData.storePickup.otherStoresPickup[x].slaMessage) { html.push(_skuData.storePickup.otherStoresPickup[x].slaMessage); } html.push('
'); html.push('
' + _skuData.storePickup.otherStoresPickup[x].storeName + '
'); html.push('
(' + distance + ' miles from your store)
'); html.push('' + stockLevel + ' in stock at this store '); html.push('
') html.push('
') html.push('
'); if(defaultchecked){ checked = ''; }else{ checked = 'checked="true"'; setChecked(_skuData.storePickup.otherStoresPickup[x].storeId); defaultchecked = true; } html.push('
' + ' Pickup at this Location
'); html.push('
'); html.push('
'); if(count < (_skuData.storePickup.otherStoresPickup.length-1)){ html.push('
'); } count++; } html.push('
'); html.push('
Same-day pickup not currently available
'); html.push('
' + getStoreModalLinkHTML() + '
'); html.push('
'); if (_skuData.backOrder) { html.push('
Ship to Store : Backordered
'); }else{ html.push('
Available for Ship to Store
'); html.push('
'); html.push('
'); html.push('
Pick up '); if (isPartiallyAvailableInStore) { html.push('All ' + selectedQty + ' '); } if (_skuData.shipToStore.timeToArrive) { if (_skuData.shipToStore.timeToArrive.indexOf('days') > -1) { html.push('in '); } html.push('7 - 10 days'); } if (_skuData.shipToStore.timeToOrder) { html.push(_skuData.shipToStore.timeToOrder); } html.push('
'); html.push('
'); html.push('
'); if(defaultchecked){ checked = ''; }else{ checked = 'checked="true"'; setChecked('sts'); defaultchecked = true; } html.push('
' + ' Ship to Store
'); html.push('
'); } html.push('
'); html.push('
'); html.push(getStorePickupNotOfferedHTML()); html.push('
'); } } else { if (_skuData.storePickup.display || _skuData.shipToStore.display) { html.push(''); html.push('
In-store Pickup
'); html.push('
' + getStoreModalLinkHTML() + '
'); html.push('
This item is available for curbside pickup.
'); } $content.append(html.join('')) togglePDPButtons(purchaseable); break; } } let radios = document.getElementsByName('storepickupinputradio'); for(i = 0; i < radios.length; i++) { radios[i].onclick = function(e) { if(this.checked){ $('#poductAddLocationId').val(this.value) } } } } function setChecked(locationId){ $('#poductAddLocationId').val(locationId) } $(document).ready(function () { /* document.ready will fire too quickly */ if (pickupOptions && pickupOptions.skus && pickupOptions.skus.length == 1) {getInventoryDataFromSku(pickupOptions.skus[0].skuId); } else if ($("#selectedColor14524820").val() != '' && $("#selectedSize14524820").val() != '') { $("select[name='quantity']").trigger('change'); //in case a sku is preselected, a quantity change will load the availability } });