Jump to content

Manage google map store locator displaying


Recommended Posts

by default it isn't possible to display store locator map in the other pages (and parts of the store).

In this case it is necessary to modify the templates and also core prestashop files, everything depneds on where you exactly want to display the map.

 

btw. other thing: just modify the tinymce (extend its features) and you will be able to use scripts there + other html tags, then you will be able to add map manually in the editor (just paste correct code)

Link to comment
Share on other sites

I just tried your solution, the problem is the CSS stylesheet and JS script corresponding are not loaded, so the google map exists in the DOM of my about us page but doesn't works.

 

Even I knew corresponding CSS and JS to load on this page it will be too dirty to do that by hand.

 

Can you explain me your solution about modifying directly the template ?

I want to display the map under the text written in the tinymce editor of the page.

Link to comment
Share on other sites

hello

 

may i know what kind of code you tried to add to tinymce? you have to copy from browser, not from .tpl file.

 

first solution:

go to the themes/your_theme/cms.tpl

paste your code there (don't forget about {literal}{/literla} tags for java script)

 

then in the CMS controller (controllers/front/CMScontroller.php)

 

you've got there set_media(); function:

 

public function setMedia()
{
 parent::setMedia();
 if ($this->assignCase == 1)
  $this->addJS(_THEME_JS_DIR_.'cms.js');
 $this->addCSS(_THEME_CSS_DIR_.'cms.css');
}

 

append there scripts related to the google map + css styles.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...