Find a Samsung store

    Kategori Produk di Toko

    Opening Hours:

    Store Pickup:

    No store found
    " + '

    ' + storeDetails.name + '

    ' + '
    ' + '' + "
    " + "
    "; if (lastOpenInfo) { lastOpenInfo.close(); } var infowindow = new google.maps.InfoWindow({ content: contentString, }); infowindow.open({ anchor: marker, map: map, shouldFocus: false, }); lastOpenInfo = infowindow; marker.addListener('click', function () { map.panTo(marker.position); if (lastOpenInfo) { lastOpenInfo.close(); } infowindow.open({ anchor: marker, map: map, shouldFocus: false, }); lastOpenInfo = infowindow; initStore(storeDetails.id); }); return infowindow; } function initStore(storeid) { var result = null; storeLocations.filter(function (c) { return c.id === storeid }).forEach(function (storeDetails) { setDetailTop(storeDetails); setAddress(storeDetails); setProductListing(storeDetails.products); setOpening(storeDetails.opening); setStorePickup(storeDetails.pickup); setStoreBook(storeDetails.pickup, storeDetails.ctaUrl, storeDetails.ctaLabel); result = storeDetails; }); return result; } function getLocation() { if (navigator.geolocation) { navigator.geolocation.getCurrentPosition(function (curPos) { position = curPos; initStores(defaultProvince); }); } } function getDistances(lat1, lon1, lat2, lon2) { var R = 6371; // km var dLat = toRad(lat2 - lat1); var dLon = toRad(lon2 - lon1); var lat1 = toRad(lat1); var lat2 = toRad(lat2); var a = Math.sin(dLat / 2) * Math.sin(dLat / 2) + Math.sin(dLon / 2) * Math.sin(dLon / 2) * Math.cos(lat1) * Math.cos(lat2); var c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a)); var d = R * c; return d; } function toRad(Value) { return Value * Math.PI / 180; } function setDetailTop(storeDetails) { $('#detail-top-name').text(storeDetails.name); $('#detail-top-type').text(storeDetails.brandType); } function setAddress(storeDetails) { $('#address-item-map').attr('href', 'https://www.google.com/maps/search/?api=1&query=' + storeDetails.latitude + ',' + storeDetails.longitude); $('#address-name').text(storeDetails.address + ', ' + storeDetails.cityName + ', ' + storeDetails.postalCode); if (!storeDetails.phone) { $('#address-item-tel').hide(); $('#address-phone').hide(); } else { $('#address-item-tel').show(); $('#address-phone').show(); $('#address-item-tel').attr('href', 'tel:' + storeDetails.phone); $('#address-phone').text(storeDetails.phone); } if (!storeDetails.email) { $('#address-item-email').hide(); $('#address-email').hide(); } else { $('#address-item-email').show(); $('#address-email').show(); $('#address-item-email').attr('href', 'mailto:' + storeDetails.email); $('#address-email').text(storeDetails.email); } } function setProductListing(products) { $('#product-list').empty(); products.forEach(function (item) { $('#product-list').append('

    ' + item.Category + '

    '); var productsString = ''; item.SubcategoryArray.forEach(function (e) { productsString += '
  • ' + e + '
  • '; }); $('#product-list').append('
      ' + productsString + '
    '); }); } function setOpening(opening) { $('#opening').hide(); $('#opening ul').empty(); if (opening && opening.length > 0) { $('#opening').show(); opening.forEach(function (element) { $('#opening ul').append('
  • ' + element + '
  • '); }); } } function setStorePickup(pickup) { if (pickup) { $('#store-pickup-top').show(); $('#store-pickup-detail').show() $('#store-pickup-detail').text('Order Online and pickup in store available.'); } else { $('#store-pickup-top').hide(); $('#store-pickup-detail').hide(); } } function setStoreBook(pickup, ctaUrl, ctaLabel) { if (pickup && ctaUrl && ctaLabel) { $('#store-pickup-book').attr("style", "display: block !important;"); $('#store-pickup-book').attr("href", ctaUrl); $('#store-pickup-book').text(ctaLabel); } else { $('#store-pickup-book').attr("style", "display: none !important;");//.hide(); } } function defer(method) { if (window.jQuery) { method(); } else { setTimeout(function () { defer(method) }, 50); } } defer(function () { getLocation(); $(document).ready(function () { var url = 'https://id-ses-locator-page-revamp-11509-proxy-api-prod.azurewebsites.net/StoreService/GetAll'; if (window.document.location.origin.indexOf('www.samsung.com/')>0) { url = 'https://id-ses-locator-page-revamp-11509-proxy-api-prod.azurewebsites.net/StoreService/GetAll'; } $('#loader').removeClass('hidden'); $('#nostore').addClass('hidden'); $.getJSON(url, function (data) { storeLocations = data; $.each(storeLocations, function (i, el) { if ($.inArray(el.area.toUpperCase(), provinces) === -1) provinces.push(el.area.toUpperCase()); }); provinces.sort(); provinces.forEach(function (c) { $('#province').append(''); }); $('#province').val(defaultProvince); initStores(defaultProvince); }).always(function() { $('#loader').addClass('hidden'); $('#nostore').removeClass('hidden'); }); }); }); function initStores(province, storeName, isChange) { markers = []; $('#store-item').empty(); var provinceStores = []; if (position && !isChange) { provinceStores = storeLocations.filter(function (c) { if (getDistances(position.coords.latitude, position.coords.longitude, c.latitude, c.longitude) <= 10) { return c; } }); if (provinceStores.length > 0) { $("#province").val(provinceStores[0].area); } } if (provinceStores.length == 0) { provinceStores = storeLocations.filter(function (c) { if (storeName && storeName.length > 0) { if (province && province.length > 0) { return c.area.toUpperCase() == province.toUpperCase() && ( c.name.toUpperCase().indexOf(storeName.toUpperCase()) > -1 || c.postalCode.toUpperCase().indexOf(storeName.toUpperCase()) > -1 || c.address.toUpperCase().indexOf(storeName.toUpperCase()) > -1 ); } else { return c.name.toUpperCase().indexOf(storeName.toUpperCase()) > -1; } } else { if (province && province.length > 0) { return c.area.toUpperCase() == province.toUpperCase(); } } return c; }); } if (provinceStores.length > 0) { $('#storeDetails').show(); $('#StoreLocations').show(); $('#nostore').hide(); provinceStores.sort(function (a, b) { return (a.name < b.name) ? -1 : (a.name > b.name) ? 1 : 0; }); var firstStore = provinceStores[0]; initStore(firstStore.id); initMap(Number(-6.2239746), Number(106.8269368)); provinceStores.forEach(function (store, index) { var storeName = store.name; if ($(window).width() >= 1025) { storeName += ' | ' + store.address; } if (store.pickup) { storeName += ' (Store pickup available)'; } var storeLocation = '
  • ' + storeName + '
  • '; $('#store-item').append(storeLocation); var storeLink = document.getElementById('store-' + store.id); storeLink.setAttribute('onclick', 'setMapLocations(' + store.latitude + ', ' + store.longitude + ', ' + store.id + ')'); var marker = setMapLocations(Number(store.latitude), Number(store.longitude)); setInfoWindow(marker, store); }); setInfoWindow(markers[0], firstStore); if (province.toUpperCase() !== defaultProvince) { setFitToBound(markers); } } else { $('#storeDetails').hide(); $('#StoreLocations').hide(); $('#nostore').show(); } } function getSelectedProvince() { var province = ''; $('#province option:selected').each(function () { province = $(this).text(); }); return province == 'Select Province' ? '' : province; }