From 209c5e53d9e1bd526f5f6ba2369dc660d1bb690e Mon Sep 17 00:00:00 2001 From: fGaillard Date: Wed, 7 Mar 2012 16:09:01 +0000 Subject: [PATCH] [-] FO : #PSTEST-969 : BugFix Store icon in GMap git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@13934 b9a71923-0436-4b27-9f14-aed3839534dd --- controllers/front/StoresController.php | 3 ++- themes/default/js/stores.js | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/controllers/front/StoresController.php b/controllers/front/StoresController.php index 583b5766e..d4e5506f6 100644 --- a/controllers/front/StoresController.php +++ b/controllers/front/StoresController.php @@ -157,7 +157,7 @@ class StoresControllerCore extends FrontController */ protected function assignStores() { - $this->context->smarty->assign('hasStoreIcon', file_exists(dirname(__FILE__).'/../img/'.Configuration::get('PS_STORES_ICON'))); + $this->context->smarty->assign('hasStoreIcon', file_exists(_PS_IMG_DIR_.Configuration::get('PS_STORES_ICON'))); $distanceUnit = Configuration::get('PS_DISTANCE_UNIT'); if (!in_array($distanceUnit, array('km', 'mi'))) @@ -198,6 +198,7 @@ class StoresControllerCore extends FrontController $address = $this->processStoreAddress($store); $other = ''; + if (!empty($store['hours'])) { $hours = unserialize($store['hours']); diff --git a/themes/default/js/stores.js b/themes/default/js/stores.js index 12aa631a9..659de7a70 100644 --- a/themes/default/js/stores.js +++ b/themes/default/js/stores.js @@ -35,14 +35,14 @@ function initMarkers() { var name = markerNodes[i].getAttribute('name'); var address = markerNodes[i].getAttribute('address'); - var addressNoHtml = markerNodes[i].getAttribute('addressNoHtml'); + var addressNoHtml = markerNodes[i].getAttribute('addressNoHtml'); var other = markerNodes[i].getAttribute('other'); var id_store = markerNodes[i].getAttribute('id_store'); var has_store_picture = markerNodes[i].getAttribute('has_store_picture'); var latlng = new google.maps.LatLng( parseFloat(markerNodes[i].getAttribute('lat')), parseFloat(markerNodes[i].getAttribute('lng'))); - createMarker(latlng, name, address, addressNoHtml, other, id_store, has_store_picture); + createMarker(latlng, name, address, other, id_store, has_store_picture); bounds.extend(latlng); } }); @@ -135,7 +135,7 @@ function searchLocationsNear(center) }); } -function createMarker(latlng, name, address, addressNoHtml, other, id_store, has_store_picture) +function createMarker(latlng, name, address, other, id_store, has_store_picture) { var html = ''+name+'
'+address+(has_store_picture == 1 ? '

' : '')+other+'
'+translation_5+'<\/a>'; var image = new google.maps.MarkerImage(img_ps_dir+'logo_stores.gif');