rachel01 Posted February 26, 2018 Share Posted February 26, 2018 Bonjour, Je tente d'afficher en vain la carte de Google avec les magasins sur mon site. J'ai suivi tous les tutos, j'ai ajouté bien évidement la Key au bon endroit, toujours pas d'affichage. Voici la page problématique en question : https://www.esteticpen.com/magasins Avez-vous des idées ? Merci d'avance Link to comment Share on other sites More sharing options...
Eolia Posted February 26, 2018 Share Posted February 26, 2018 Bah vous n'avez pas du mettre la clé au bon endroit ou votre thème n'est pas compatible: js?sensor=true:38 Google Maps API error: MissingKeyMapError https://developers.google.com/maps/documentation/javascript/error-messages#missing-key-map-error Link to comment Share on other sites More sharing options...
rachel01 Posted February 26, 2018 Author Share Posted February 26, 2018 Bah si, j'ai bien mis la clé au bon endroit. J'ai bien vu cette erreur dans la console mais j'ai bien la clé API, on le voit dans le code source Et que signifie thème pas compatible ? Link to comment Share on other sites More sharing options...
Eolia Posted February 26, 2018 Share Posted February 26, 2018 Ah bon ? Moi je vois plutôt ça: Link to comment Share on other sites More sharing options...
rachel01 Posted February 26, 2018 Author Share Posted February 26, 2018 Et pourtant il y a bien les 2, voir un peu plus haut dans le code (sur la page des magasins uniquement) Link to comment Share on other sites More sharing options...
Eolia Posted February 26, 2018 Share Posted February 26, 2018 Bah oui mais la page de votre thème appelle son propre script sans la clé et avec le sensor... Contrôlez ces fichiers stores.tpl et stores.js dans votre thème ! Link to comment Share on other sites More sharing options...
rachel01 Posted February 26, 2018 Author Share Posted February 26, 2018 J'avais déjà vérifier stores.js et j'avais mis la clé dans l'URL Quant à stores.tpl, pas d'appel de script dedans. Avez-vous une idée ? Merci Link to comment Share on other sites More sharing options...
Eolia Posted February 26, 2018 Share Posted February 26, 2018 Regardez en bas de storesController.php (fonction setMedia -> addJS...) Link to comment Share on other sites More sharing options...
rachel01 Posted February 27, 2018 Author Share Posted February 27, 2018 Voici la fonction setMedia dans StoresController.php J'y avais aussi mis la clé... public function setMedia() { parent::setMedia(); $this->addCSS(_THEME_CSS_DIR_.'stores.css'); if (!Configuration::get('PS_STORES_SIMPLIFIED')) { $default_country = new Country((int)Tools::getCountry()); $this->addJS('http'.((Configuration::get('PS_SSL_ENABLED') && Configuration::get('PS_SSL_ENABLED_EVERYWHERE')) ? 's' : '').'://maps.google.com/maps/api/js?key=AIzaSyAtkAe59M5gabcKD_dR49Q88zisgYeKlX4&sensor=true®ion='.substr($default_country->iso_code, 0, 2)); $this->addJS(_THEME_JS_DIR_.'stores.js'); } } Link to comment Share on other sites More sharing options...
Eolia Posted February 27, 2018 Share Posted February 27, 2018 Le sensor=true, vous pouvez l'enlever, ce paramètre est déprecated by Google depuis 4 ans. Il reste toujours celui-là: Donc soit ajouté par un module, soit par le thème. Effectuez une recherche par thème dans ces 2 répertoires (/modules et /themes/votre_theme) sur "sensor" ou "api/js" et vous allez bien finir par trouver le coupable^^ Link to comment Share on other sites More sharing options...
rachel01 Posted February 27, 2018 Author Share Posted February 27, 2018 Bonjour, Merci pour cette réponse. Juste question technique : si mon site est sur un FTP, comment puis-je effectuer cette recherche ? Merci beaucoup Link to comment Share on other sites More sharing options...
Eolia Posted February 27, 2018 Share Posted February 27, 2018 On réfléchit 2 min rapatriez ces 2 répertoires sur votre PC et effectuez une recherche avec Notepad++ Link to comment Share on other sites More sharing options...
macu Posted March 4, 2018 Share Posted March 4, 2018 J'ai résolu le problème de la carte dans les ordres avec ceci: https://belvg.com/blog/how-to-fix-google-maps-api-error-missingkeymaperror-in-prestashop.html 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