lamour_b Posted August 7, 2013 Share Posted August 7, 2013 How to display the google map store locator in specific pages ? For example: Display the google map in the about us CMS page. I can't figure out how to do that in Modules/Positions. Some help would be nice Link to comment Share on other sites More sharing options...
vekia Posted August 7, 2013 Share Posted August 7, 2013 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 More sharing options...
lamour_b Posted August 7, 2013 Author Share Posted August 7, 2013 Ok, I just extend my tinymce. Do you know which code to past in and which tag to use ? Link to comment Share on other sites More sharing options...
vekia Posted August 7, 2013 Share Posted August 7, 2013 copy whole code related to the google maps and use HTML editor (is a part of features available in tinymce) Link to comment Share on other sites More sharing options...
lamour_b Posted August 8, 2013 Author Share Posted August 8, 2013 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 More sharing options...
vekia Posted August 8, 2013 Share Posted August 8, 2013 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now