[-] 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
This commit is contained in:
@@ -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']);
|
||||
|
||||
@@ -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 = '<b>'+name+'</b><br/>'+address+(has_store_picture == 1 ? '<br /><br /><img src="'+img_store_dir+parseInt(id_store)+'-medium.jpg" alt="" />' : '')+other+'<br /><a href="http://maps.google.com/maps?saddr=&daddr='+latlng+'" target="_blank">'+translation_5+'<\/a>';
|
||||
var image = new google.maps.MarkerImage(img_ps_dir+'logo_stores.gif');
|
||||
|
||||
Reference in New Issue
Block a user