Skip to content

Our stores

test
test
test
test
${value.telephone}
${value.working_hours}
`); } else if((value.status === 1 || value.status === 2) && value.working_hours == null && value.telephone != null) { $('.storepickup-content').append(`
  • ${value.name}

    ${value.store_address}

    ${value.email_address}
    ${value.telephone}
`); } else if((value.status === 1 || value.status === 2) && value.working_hours.length == 0 && value.telephone.length == 0) { $('.storepickup-content').append(`
`); } }); //console.log('1'); } }, complete: function() { initiSenseLabsMap(); $('div.storepickup-data ul>li:first').click(); if(detect_location){ if (navigator.geolocation) { navigator.geolocation.getCurrentPosition( (position) => { // Set the client's location on the map var userLocation = new google.maps.LatLng(parseFloat(position.coords.latitude), parseFloat(position.coords.longitude)); var infowindow2 = new google.maps.InfoWindow(); infowindow2.setPosition({ lat: position.coords.latitude, lng: position.coords.longitude, }); infowindow2.setContent("Your Location"); infowindow2.open(offices_map); // Zoom out 1 level, because the fitBound is not zooming enought google.maps.event.addListenerOnce(offices_map, 'bounds_changed', function(event) { this.setZoom(offices_map.getZoom()-1); if (this.getZoom() > 15) { this.setZoom(15); } }); //Calculate the closest store var closestMarker = -1; var closestDistance = Number.MAX_VALUE; for( storeKey in stores ) { var distance = google.maps.geometry.spherical.computeDistanceBetween(stores[storeKey].marker.getPosition(),userLocation); if ( distance { console.log("Not given location permission."); } ); } } if(detect_markers){ setTimeout(function(){ offices_map.addListener('bounds_changed', function(e) { getStoresInView(); }); }, 1000); } } }); function initiSenseLabsMap() { if (defaultStore) { var myobj = JSON.parse($("#store-map-styles").html()); var mapOptions = { center: defaultStore.latLng, zoom: defaultStore.zoom, panControl:true, zoomControl:true, mapTypeControl:true, scaleControl:true, streetViewControl:true, overviewMapControl:true, rotateControl:true, styles: myobj }; infowindow = new google.maps.InfoWindow(); offices_map = new google.maps.Map(document.getElementById("currency_widget_map"), mapOptions); for (x in stores) { var marker = new google.maps.Marker({ position: stores[x].latLng, map: offices_map, title: stores[x].name, id: stores[x].id }); stores[x].marker = marker; } addInfoWindows(stores); autocomplete(document.getElementById("myInput"), stores); } } function addInfoWindows(stores) { var prev_infowindow = false; $.each(stores, function(storeId, stores) { var infowindow = new google.maps.InfoWindow(); var street_image = stores.street_image; if(street_image) { var infoContent = "

" + stores.name + "

" + stores.store_address + "

Phone: "+ stores.telephone + "Email: " + stores.email_address + "

"+ working_hour_text +": " + stores.working_hours + "

" + stores.name + "

" + stores.store_address + "

"+ stores.telephone + "Email: " + stores.email_address + ""+ working_hour_text +": " + stores.working_hours + "

"; } google.maps.event.addListener(stores.marker, 'click', function() { if( prev_infowindow ) { prev_infowindow.close(); } infowindow.close(); $("[data-value]").removeClass('active'); $("[data-value=store-"+storeId+"]").addClass('active'); $("[data-value=store-"+storeId+"]").click(); $(this).addClass('active'); }) }); } function getStoresInView(){ var stores_in_view = []; var bounds = offices_map.getBounds(); bounds = Object.values(bounds); for(x in stores){ if((stores[x].longitude >= bounds[1].g && stores[x].longitude = bounds[0].g && stores[x].latitude { $('li[data-value="store-' + index + '"]').parent().parent().prependTo('.storepickup-content'); }); $('.list-group-item.store-list-item.active').parent().parent().prependTo('.storepickup-content'); $('.storepickup-content').scrollTop(0); } function autocomplete(inp, stores) { /*the autocomplete function takes two arguments, the text field element and an array of possible autocompleted values:*/ var currentFocus; var arr = []; var storeNames = []; var storeAddresses =[]; var zipCodes = []; for (x in stores) { arr.push(stores[x].name); storeAddresses.push(stores[x].store_address.toLowerCase()); zipCodes.push(stores[x].zip_code.toLowerCase()); } inp.addEventListener("input", function(e) { var a, b, i, val = this.value; var id = null; closeAllLists(); if (!val) { return false;} currentFocus = -1; a = document.createElement("DIV"); a.setAttribute("id", this.id + "autocomplete-list"); a.setAttribute("class", "autocomplete-items"); this.parentNode.appendChild(a); for (i = 0; i " + arr[i].substr(0, val.length) + ""; b.innerHTML += arr[i].substr(val.length); b.innerHTML += ""; for (x in stores) { if(arr[i] == stores[x].name) { console.log(x); id = x; } } // Creatin a local scope with a function so .addEventListener wont paste the latest id, but the id corresponding to the for cycle. (function(id) { var id = id; b.addEventListener("click", function(e) { inp.value = this.getElementsByTagName("input")[0].value; $("[data-value=store-"+id+"]").click(); //$(".store-list-item.active").get(0).scrollIntoView(); closeAllLists(); }); })(id); a.appendChild(b); } } }); inp.addEventListener("keydown", function(e) { var x = document.getElementById(this.id + "autocomplete-list"); if (x) x = x.getElementsByTagName("div"); if (e.keyCode == 40) { currentFocus++; addActive(x); } else if (e.keyCode == 38) { currentFocus--; addActive(x); } else if (e.keyCode == 13) { e.preventDefault(); if (currentFocus > -1) { if (x) x[currentFocus].click(); } } }); function addActive(x) { if (!x) return false; removeActive(x); if (currentFocus >= x.length) currentFocus = 0; if (currentFocus " : ''; if(website_url){ if(working_hours) { if(street_image) { var infoContent = "

" + stores[storeId].name + "

" + stores[storeId].store_address + "

"+ working_hour_text +": " + stores[storeId].working_hours + "

" + stores[storeId].name + "

" + stores[storeId].store_address + "

"+ working_hour_text +": " + stores[storeId].working_hours + "

"+ show_store_image +"
"; } } else { if(street_image) { var infoContent = "

" + stores[storeId].name + "

" + stores[storeId].store_address + "

" + stores[storeId].name + "

" + stores[storeId].store_address + "

"+ show_store_image +"
"; } } } else { if(working_hours) { if(street_image) { var infoContent = "

" + stores[storeId].name + "

" + stores[storeId].store_address + "

"+ working_hour_text +": " + stores[storeId].working_hours + "

" + stores[storeId].name + "

" + stores[storeId].store_address + "

"+ working_hour_text +": " + stores[storeId].working_hours + "

"+ show_store_image +"
"; } } else { if(street_image) { var infoContent = "

" + stores[storeId].name + "

" + stores[storeId].store_address + "

" + stores[storeId].name + "

" + stores[storeId].store_address + "

"+ show_store_image +"
"; } else if (email_address && !telephone ) { var infoContent = "

" + stores[storeId].name + "

" + stores[storeId].store_address + "

"+ show_store_image +"
"; } else if (!email_address && telephone ) { var infoContent = "

" + stores[storeId].name + "

" + stores[storeId].store_address + "

"+ show_store_image +"
"; } else { var infoContent = "

" + stores[storeId].name + "

" + stores[storeId].store_address + "

"+ show_store_image +"
"; } } } } infowindow.setContent(infoContent); if( prev_infowindow ) { prev_infowindow.close(); } prev_infowindow = infowindow; infowindow.open(offices_map, stores[storeId].marker); } }); }); }; // ]]>

Added to cart