Jump to content
babyewok

Store Map Error: Missing API Key

Recommended Posts

I also have this issue.

 

"Oops! Something went wrong. This page didn't load Google Maps correctly. See the JavaScript console for technical details."

 

Did someone found a solution?

Thanks.

Share this post


Link to post
Share on other sites

Yes, these are the errors and warnings.

I'm using 1.6.1.6. The error was also on 1.6.1.5...

 

Share this post


Link to post
Share on other sites

Works a treat, thanks.  On a slighlty different note, if there is only one store, do you know how to show the store address an opening times under the map as well as on it?

 

I also find that the store search facility never finds the store!

Edited by babyewok (see edit history)

Share this post


Link to post
Share on other sites

I installed the Google Maps fix - Store locator module and configure it according to the guide but it still doesn't work.

Any idea?

  • Like 2

Share this post


Link to post
Share on other sites

Wait for cache to clear

Hi mdekker,

 

May I know what cache I need to wait for it to be cleared?

Can I manually clear it?

Share this post


Link to post
Share on other sites

PHP OPCache, since the location to the API key is set in PHP

How long do I have to wait? Any way I can manually clear the cache?

Share this post


Link to post
Share on other sites

Hmmz, maybe you just used the wrong key, haven't enabled overrides or something like that.

I follow the steps in the module and got the key from Google API. Is there something else I missed?

Share this post


Link to post
Share on other sites

Hi mdekker,

 

In my case, your code adds the key at the end of the gmaps url: http://maps.google.com/maps/api/js?&sensor=true&region=US&AIza.........k instead of

http://maps.google.com/maps/api/js?key=AIza....................k&sensor=true&region=US

 

So for you guys who installed mdekker's code, if you decide to edit /controllers/front/StoresController.php and add the key there it will not work with this module installed and the key field in the module config empty. You will have to unisntall first and clear the smarty or other cache.

 

mdekker, please correct me if i'm wrong.

 

On the other hand, thanks a lot for your advice with the js key.

 

All the best

Share this post


Link to post
Share on other sites

Map is displayed but searching is not working. If you input any address it says "Not found".

 

On Prestashop version 1.6.1.6 with old domain (thus without api key), searching works. But with new domain and api key does not.

 

Any help?

Share this post


Link to post
Share on other sites

Did you try any of the suggested solutions in this topic?

 

Yes and map is displayed correctly.

 

More: I started developing shop with test domain before changes in Google maps. So with test domain I can test both: with and without api key. Without api key all works. When I add api key map is displayed correctly but searching is broken. The only change in code and database is in StoresController. So definitely adding api key solves problem with map but breaks searching.

Share this post


Link to post
Share on other sites

Hi All,

 

I have installed ps v1.6.1.6 and faced same issue for google map display.

 

I edit stroreController page as per mdekker suggect. Google map work fine but search not.

 

Please write here if any one found solution.

 

 

Thanks in advance.

Share this post


Link to post
Share on other sites

Hi All,

 

Finally found solution for google map searching issue.

 

We just need to enable following APIs from Google Console. https://console.developers.google.com/apis/library.

 

  1. Google Maps JavaScript API
  2.  Google Maps Geocoding API
  3.  Google Maps Geolocation API

You can see attached screenshot for better under stand.post-1290986-0-00407100-1469690302_thumb.png

Please do this. It will resolve your issue. Enjoy :) :)

 

Please make this topic as solved if it resolve your issue.

 

 

 

 

 

 

Edited by chirag_0110 (see edit history)
  • Like 5

Share this post


Link to post
Share on other sites

It works for me. Thanks.

Hi nnd,

 

Most welcome,

Glad to hear from you. You can like post if it helps you.

 

Thanks,

Chirag

Share this post


Link to post
Share on other sites

Hello,

Have used mpgoogle maps fix module but it did not work. It did not input API key into storescontroller.php file. Any idea why?

Share this post


Link to post
Share on other sites

Hi All,

 

Finally found solution for google map searching issue.

 

We just need to enable following APIs from Google Console. https://console.developers.google.com/apis/library.

 

  1. Google Maps JavaScript API
  2.  Google Maps Geocoding API
  3.  Google Maps Geolocation API

You can see attached screenshot for better inder stand.attachicon.gifScreenshot_1.png

Please do this. It will resolve your issue. Enjoy :) :)

 

Please make this topic as solved if it resolve your issue.

 

 

 

 

 

 

 

Hi chirag_0110,

 

how can I apply your solution to my map search issue? My site is http://levanzo.com.my/en/stores

Share this post


Link to post
Share on other sites

Hi

 

I understand this is work in front, but what about the admin order edit page?
I have a same issue in admin order editor google map.

 

Someone can tell me where need to modify?

 

Thanks....

Share this post


Link to post
Share on other sites

Hi chirag_0110,

 

how can I apply your solution to my map search issue? My site is http://levanzo.com.my/en/stores

Hi samsootho,

 

Nothing need to do from your store (Site). Just need to enable mentioned three APIs from your google developer account.

  1. Google Maps JavaScript API
  2.  Google Maps Geocoding API
  3.  Google Maps Geolocation API

 

Let me know if needed my help.

 

Thanks,

Chirag

Share this post


Link to post
Share on other sites

Hi!

 

How are you?

Please, I need some help.

The trouble persists.

I have edit storeController page as mdekker suggect and I have enable following APIs from Google Console. https://console.developers.google.com/apis/library.

 
Google Maps JavaScript API
 Google Maps Geocoding API
 Google Maps Geolocation API
 
 The text error:
util.js:208
js?sensor=true&region=ES&key%3D"AIzaSyCMo4AWsHMCle5cJ1ioj4NbmyR4VwvcLwM":34
- Google Maps API error: MissingKeyMapError https://developers.google.com/maps/documentation/javascript/error-messages#missing-key-map-error_.ib @ js?sensor=true&region=ES&key%3D"AIzaSyCMo4AWsHMCle5cJ1ioj4NbmyR4VwvcLwM":34(anonymous function) @ common.js:51(anonymous function) @ common.js:192c @ common.js:45(anonymous function) @ AuthenticationService.Authenticate?1shttp%3A%2F%2Fcarolinasierra.es%2Fshop%2Findex.php%3Fcontroller…:1
 
Thank you very much for your time and assistance in this matter.
 
Regards.
 
Joan
  • Like 1

Share this post


Link to post
Share on other sites

 

Hi!

 

How are you?

Please, I need some help.

The trouble persists.

I have edit storeController page as mdekker suggect and I have enable following APIs from Google Console. https://console.developers.google.com/apis/library.

 
Google Maps JavaScript API
 Google Maps Geocoding API
 Google Maps Geolocation API
 
 The text error:
util.js:208
js?sensor=true&region=ES&key%3D"AIzaSyCMo4AWsHMCle5cJ1ioj4NbmyR4VwvcLwM":34
- Google Maps API error: MissingKeyMapError https://developers.google.com/maps/documentation/javascript/error-messages#missing-key-map-error_.ib @ js?sensor=true&region=ES&key%3D"AIzaSyCMo4AWsHMCle5cJ1ioj4NbmyR4VwvcLwM":34(anonymous function) @ common.js:51(anonymous function) @ common.js:192c @ common.js:45(anonymous function) @ AuthenticationService.Authenticate?1shttp%3A%2F%2Fcarolinasierra.es%2Fshop%2Findex.php%3Fcontroller…:1
 
Thank you very much for your time and assistance in this matter.
 
Regards.
 
Joan

 

 

Hi Joan,

 

It should only happen if All mentioned google api not enable for your google api key.

Can you please confirm once ?

 

May be you enable those apis for another project (API KEY).

Share this post


Link to post
Share on other sites

Need help!

I am totally lost. I have set up the browser api key and enabled three apis including the javascript one. I copied the key to the google map fix module. Not working. Then I manually added it to the controllers/front/StoresController.php. Still not working. Any suggestion? the url is https://addtocontainer.co.nz/stores 

Many thanks

  • Like 1

Share this post


Link to post
Share on other sites

I have a same issue in admin order delivery address google map.
Someone can tell me where need to place the api key for working?
 
Thanks....

Share this post


Link to post
Share on other sites

Good evening, I'm having the same problem on the maps . already created the api key and put on file /controllers/front/StoresController.php put the map appears and disappears then with the message " Oops ! Something went wrong. This page did not load Google Maps correctly. See the JavaScript console to see technical details . " My version of prestashop is 1.6.1.6 . I have another store on the same server and does not occur this problem . I do not know what to do. I appreciate any help .

Good evening, I'm having the same problem on the maps . already created the api key and put on file /controllers/front/StoresController.php put the map appears and disappears then with the message " Oops ! Something went wrong. This page did not load Google Maps correctly. See the JavaScript console to see technical details . " My version of prestashop is 1.6.1.6 . I have another store on the same server and does not occur this problem . I do not know what to do. I appreciate any help .

Share this post


Link to post
Share on other sites

Hi samsootho,

 

Nothing need to do from your store (Site). Just need to enable mentioned three APIs from your google developer account.

  1. Google Maps JavaScript API
  2.  Google Maps Geocoding API
  3.  Google Maps Geolocation API

 

Let me know if needed my help.

 

Thanks,

Chirag

 

Hi Chirag,

 

thanks for your reply.

 

I have enabled the mentioned APIs, do I need to add the API to anywhere of the website?

 

Best,

 

Sam

Edited by samsootho (see edit history)

Share this post


Link to post
Share on other sites

Hi Chirag,

 

thanks for your reply.

 

I have enabled the mentioned APIs, do I need to add the API to anywhere of the website?

 

Best,

 

Sam

Hi Chirag,

 

I managed to find the location for API following an earlier post in this topic. Thanks for your advice. You guys are awesome!

  • Like 1

Share this post


Link to post
Share on other sites

Good evening, I'm having the same problem on the maps . already created the api key and put on file /controllers/front/StoresController.php put the map appears and disappears then with the message " Oops ! Something went wrong. This page did not load Google Maps correctly. See the JavaScript console to see technical details . " My version of prestashop is 1.6.1.6 . I have another store on the same server and does not occur this problem . I do not know what to do. I appreciate any help .

Good evening, I'm having the same problem on the maps . already created the api key and put on file /controllers/front/StoresController.php put the map appears and disappears then with the message " Oops ! Something went wrong. This page did not load Google Maps correctly. See the JavaScript console to see technical details . " My version of prestashop is 1.6.1.6 . I have another store on the same server and does not occur this problem . I do not know what to do. I appreciate any help .

 

There are 2 easy steps only, go to the following links:

 

Step 1: Get the API --> https://www.prestashop.com/forums/topic/539319-store-map-error-missing-api-key/page-2?do=findComment&comment=2375038

 

Step 2: Insert the API --> https://www.prestashop.com/forums/topic/539319-store-map-error-missing-api-key/?p=2360228

Share this post


Link to post
Share on other sites

Good morning , I have done these changes and it did not work , the map appears and disappears soon after.

Share this post


Link to post
Share on other sites

Hi there!

 

I had the same problem and tried again and again to have a solution, finally I fixed it. I want to share what worked in my case:

 

Reading the thread some comment said that It would be some problem of the theme... so I have notice that using both solutions in this thread nothing change on the mesages I saw in my Javascript console. I went to the theme support and found that in my case, the theme called Google Maps byself not using StoresController.php so I found the file in my theme (who was a module by my theme´s author) and changed there the API Key.

Ah! the varible "sensor is deprecated and not used anymore so use:

 

maps.googleapis.com/maps/api/js?v=3.exp&key=YOUR_API_KEY
 
instead of: 
 
maps.google.com/maps/api/js?key=AIzaSyCCXIIFPJD-unvMy-jB7N1ylSEUySJ9JiE&sensor=true&region=
 
Finally: It detected my API KEY but it doesn´t worked until I put in the entire url as autorized in Google API credentials page, I mean:
 myurl.com/contact instead of */myurl.com*
 
Hope it helps.
 
Edited by Lluvia (see edit history)
  • Like 1

Share this post


Link to post
Share on other sites
Good morning guys

 

I also have about the same problem.

when I press click to display the map, only for a moment and post me the error


Oops! Something went wrong.

This page didn't load Google Maps correctly. See the JavaScript console for technical details


 

I have the impression that something runs after the procedure and annuls the key of api

my site is  https://essans.gr

Share this post


Link to post
Share on other sites

Need help!

I am totally lost. I have set up the browser api key and enabled three apis including the javascript one. I copied the key to the google map fix module. Not working. Then I manually added it to the controllers/front/StoresController.php. Still not working. Any suggestion? the url is https://addtocontainer.co.nz/stores

Many thanks

 

Try read more carefuly next time ;) You've assigned your api key to region instead key and that's why google is still blocking your map generation. So to fix this just change

//maps.google.com/maps/api/js?sensor=true&region=[YOUR_API_KEY]

to

//maps.google.com/maps/api/js?key=[YOUR_API_KEY]&sensor=true&region=

Adding key=[YOUR_API_KEY]& just after .../maps/api/js? in original StoresController.php should be the only change in this file. You may also check Lluvia's fix to get rid of other warnings, but the map should load correctly without it.

 

 

@xarhs

You've made axactly the same mistake.

 

 

 

You're welcome ;)

Edited by Sharak (see edit history)

Share this post


Link to post
Share on other sites

Excellent tutorial. It works all right except that in the search can not find paices But if you let me look provinces streets, etc. Someone help me

Excellent tutorial. It works all right except that in the search can not find paices But if you let me look provinces streets, etc. Someone help me

Share this post


Link to post
Share on other sites

You will now need to visit your Google API Console, request an API key for the Google Maps JavaScript API, and change the file /controllers/front/StoresController.php

 

You can override the StoresController.php in directory /override/controllers/front/ ; I think it's a better idea to not lose this hack in case of minor Prestashop update.

Edited by Trafiquant (see edit history)

Share this post


Link to post
Share on other sites

Ok, I have followed instructions and still getting error messages

"Google Maps API error: MissingKeyMapError https://developers.google.com/maps/documentation/javascript/error-messages#missing-key-map-error"js:34:391
"Google Maps API warning: NoApiKeys https://developers.google.com/maps/documentation/javascript/error-messages#no-api-keys"util.js:208:33
"Google Maps API warning: SensorNotRequired https://developers.google.com/maps/documentation/javascript/error-messages#sensor-not-required"

 

https://mosquitocoilholder.boycott-big-box.com.au/stores

 

have no problem with disabled SSL, but I need the SSL on every page?? Any ideas please

Share this post


Link to post
Share on other sites

I ran into the same problem and solved it (with guide in this topic). It's applicable to any Prestashop 1.6.1.x (tested with 1.6.1.7).

  1. Go to the Google API Console.
  2. Create or select a project.
  3. Click Continue to enable the API and any related services.
  4. On the Credentials page, get an API key (and set the API key restrictions). 
    Note: If you have an existing unrestricted API key, or a key with browser restrictions, you may use that key.
  5. To prevent quota theft, secure your API key following these best practices. I added the allowed referrers (*.domain.com/*, domain.com/*, https://domain.com/stores)
  6. (Optional) Enable billing. See Usage Limits for more information.
  7. To search for a shop on the map you must enable Google Maps Geocoding API in your console.developers.google.com Project.
  8. Go to /controllers/front/StoresController.php and change at the end of the file line (see file in google drive):
    https://drive.google.com/open?id=0Bw23y7_XsFjJUnRvQWZSZWdONmc
    Where YOUR-GENERATED-API-KEY-HERE you must to replace the generated API key.
  9. If you have completed step 5, then you need to wait 5 minutes for the changes (during this time you will see an error - dont worry, just wait)

  10. PROFIT!  ^_^

P.S. Please do not write anything on this topic until you have done everything in the right order.

Edited by SEC Market (see edit history)

Share this post


Link to post
Share on other sites

Ok, I have followed instructions and still getting error messages

"Google Maps API error: MissingKeyMapError https://developers.google.com/maps/documentation/javascript/error-messages#missing-key-map-error"js:34:391

"Google Maps API warning: NoApiKeys https://developers.google.com/maps/documentation/javascript/error-messages#no-api-keys"util.js:208:33

"Google Maps API warning: SensorNotRequired https://developers.google.com/maps/documentation/javascript/error-messages#sensor-not-required"

 

https://mosquitocoilholder.boycott-big-box.com.au/stores

 

have no problem with disabled SSL, but I need the SSL on every page?? Any ideas please

 

Your store is disabled so I can't check it out. Have you seen THIS?

Edited by Sharak (see edit history)

Share this post


Link to post
Share on other sites

Less tech-savvy users can download the latest version of this module: https://github.com/firstred/mpgooglemapsfix/releases

and just install it through the back office

 

This module is broken, it doens't use the 'key' GET parameter but instead appends the key to the url like this:

 

Wrong:

?sensor=true&<API_KEY>

 

Correct 

?sensor=true&key=<API_KEY>

Edited by areaweb (see edit history)

Share this post


Link to post
Share on other sites

Your store is disabled so I can't check it out. Have you seen THIS?

 

I have it back up and running with the ssl on, still can not get this - have gone back over instructions, still having same issue.

 

I did note my code was different to some others but my API is in there. I have restricted the API with the full address including wildcards as instructed. Noted in page console - error code shows my api after the sensor=true&region=US& but in the actual code it is after /maps/api/js?key= - is this the problem (you have asked if I have seen this - yes and his stores are not working either https://addtocontainer.co.nz/stores, so perhaps something in the Google Maps fix - Store locator is the problem

 

Google Error - js?sensor=true&region=US&AIzaSyDT1o38qIzgQpL8tAQYWJvlU1h8dhDsbqM:34 Google Maps API error: MissingKeyMapError https://developers.google.com/maps/documentation/javascript/error-messages#missing-key-map-error

 

 

//maps.google.com/maps/api/js?key=MY_API_IS_HERE&sensor=true&region='.substr($default_country->iso_code, 0, 2)); 

 

Not sure if this is the issue either - https://www.prestashop.com/forums/topic/288409-force-ssl-on-all-pages-google-maps-stops-working-in-storelocator/

 

Thanks in advance for your assistance

Edited by crochead (see edit history)

Share this post


Link to post
Share on other sites

just use this code:

 

replace this:

 

  1. <script src="http://maps.googleapis.com/maps/api/js"></script>  something like this
  2. in your contact tpl file with this:
    1. <script src="http://maps.googleapis.com/maps/api/js?key=BIzaSyA1gvGcwg6OPMaLsSutIecjkIXrABV3AoF"></script>;
  3. where after js?key=  here you should put your google api key. 

https://developers.google.com/maps/documentation/javascript/get-api-key

Share this post


Link to post
Share on other sites

For everyone!

 

Don't forget to insert your API key also to /controllers/admin/AdminOrdersController.php

Around line 340 (see screenshot)
 
This will fix API warnings in Backoffice.
 
And also remove &sensor=false code.

post-836203-0-07764500-1480700731_thumb.png

Edited by serdib (see edit history)
  • Like 1

Share this post


Link to post
Share on other sites

mdekker - thank you for this. One quick question, well two:

one: how do you adjust the map pan, for example mine is zoomed in as far as it can be, for the default I'd like it a little panned out to see more of the roads around my location.

two: my map icon is the prestashop penguin, can that be changed?

 

thank you for your help on this,

 

Share this post


Link to post
Share on other sites

Bonjour, j'ai un problème d'affichage google maps. Il semble qu'il s'agit de l'API KEY.

 

Quelqu'un peut m indiquer svp comment charger le codeblock2.txt avec mon code API dans le backoffice de prestashop?

 

En effet j ai bien compris comment créer le api key mais je n'arrive pas à modifier le code source je crois? quand je vais sur inspecter page ou code source de la page, je ne peux pas rajouter le text, aucune modification comment faire? merci

 

Pouvez vous m indiquer comment écrire ce code pas par pas?

 

Comme arriver sur le chemin controllers/admin/AdminOrdersController.php e faire la modification/ecriture?

 

Somewhere around line 289, you'll find the following:

txt.gif  codeblock1.txt   219 octets   1642 Nombre de téléchargements 

 

With your API key (example: POjjo83h3h379020323Hp7sY9bHB6U), change this into:

txt.gif  codeblock2.txt   254 octets   1933 Nombre de téléchargements 

Edited by pierluigi.marucci (see edit history)

Share this post


Link to post
Share on other sites

BTW, after you update a store with 1-click, you'd have to fix this stuff again. :/

Share this post


Link to post
Share on other sites

Newly detected domains require an API key from now on. That kinda sucks :/

 

Here's the announcement: http://googlegeodevelopers.blogspot.nl/2016/06/building-for-scale-updates-to-google.html

 

You will now need to visit your Google API Console, request an API key for the Google Maps JavaScript API, and change the file /controllers/front/StoresController.php

 

Somewhere around line 289, you'll find the following:

attachicon.gifcodeblock1.txt

 

With your API key (example: POjjo83h3h379020323Hp7sY9bHB6U), change this into:

attachicon.gifcodeblock2.txt

 

and Google Maps should be working again.

 Hi: I set the code. but still having the same problem, can you help me please?

 

this is mi code :

if (!Configuration::get('PS_STORES_SIMPLIFIED')) {

            $default_country = new Country((int)Tools::getCountry());
 
this is my web site:
www.meridaestablecimientos.mx
 
and this is my api credentials:
 
Clave de API
AIzaSyAlE4X4vPPPLdE69X3xUboAKlyYZGY-Sow
Nombre
Restricción de clave

La restricción de claves te permite especificar qué sitios web, direcciones IP o apps pueden usar esta clave. Más información

NingunoURL de referencia HTTP (sitios web)Direcciones IP (servidores web, trabajos cron, etc.)Apps de AndroidApps de iOS
Aceptar solicitudes de estas URL de referencia HTTP (sitios web) (Opcional)

Usa asteriscos como comodines. Si dejas esto en blanco, se aceptarán las solicitudes de cualquier URL de referencia. Asegúrate de agregar URL de referencia antes de usar esta clave en producción.

  • www.meridaestablecimientos.mx
  •  
  • I don´t know what I´m doing wrong, please help me!

Share this post


Link to post
Share on other sites

Hi, now way to get it works!

And the link to the module is not working.

 

But I got it work!

How:

Use the solution above with the .txt files, very precise and for the api don't spend too much time playing around or you will get errors. Just click https://developers.google.com/maps/documentation/javascript/get-api-key and get your key.

 

Before that I did install this module: https://www.prestashop.com/forums/topic/579631-free-module-contact-form-with-google-map-background/

I don't know if this installation add some necessary fix but now works.

Edited by massimomassimo (see edit history)

Share this post


Link to post
Share on other sites

Since PS 1.6.1.14 it is possible to enter the API key in Preferences > General :)

So no need for overrides anymore. 

  • Like 1

Share this post


Link to post
Share on other sites

Guys, I tried every single solution in this topic and also tried this to include in the cms.tpl of the theme Im using 

 

{if $cms->id==10}
{literal}


<script async defer
src="https://maps.googleapis.com/maps/api/js?key=MYKEY">
</script>


{/literal}
{/if}

There's now way for me to show google maps. It shows for a second when the page is loaded and then it goes blank to the classic error of google. In the JS console of course I see the NO API key error.

I repeat, I tried ALL the steps listed here. Still no api key error. Also tried to wait five mins after editing the controller, no results.

If I use my solution, the code I pasted above, not only I get the no api key error, but I also get the MULTIPLE API keys error TOGETHER!

I'm using a module built by me that uses this: https://hpneo.github.io/gmaps/

 

Google maps was working great in a stage environment till yesterday, today I moved this website to the production domain and this error appears all the time.

I'm using the theme Warehouse for prestashop, maybe you know it, I tried to look into it if there's something that overrides my edit in the controller but found nothing.

 

 

 

 

Share this post


Link to post
Share on other sites

 

Guys, I tried every single solution in this topic and also tried this to include in the cms.tpl of the theme Im using 

 

{if $cms->id==10}
{literal}


<script async defer
src="https://maps.googleapis.com/maps/api/js?key=MYKEY">
</script>


{/literal}
{/if}

There's now way for me to show google maps. It shows for a second when the page is loaded and then it goes blank to the classic error of google. In the JS console of course I see the NO API key error.

I repeat, I tried ALL the steps listed here. Still no api key error. Also tried to wait five mins after editing the controller, no results.

If I use my solution, the code I pasted above, not only I get the no api key error, but I also get the MULTIPLE API keys error TOGETHER!

I'm using a module built by me that uses this: https://hpneo.github.io/gmaps/

 

Google maps was working great in a stage environment till yesterday, today I moved this website to the production domain and this error appears all the time.

I'm using the theme Warehouse for prestashop, maybe you know it, I tried to look into it if there's something that overrides my edit in the controller but found nothing.

 

Did you add your production domain to the list of accepted domains by that key in Google Console?

Share this post


Link to post
Share on other sites

Did you add your production domain to the list of accepted domains by that key in Google Console?

 

Actually nope, should I do it? I included google maps in like 15+ wordpress websites by only including the api key and without setting a domain. I'll try this but I doubt that's the issue

Share this post


Link to post
Share on other sites

Hi Chirag,

 

I managed to find the location for API following an earlier post in this topic. Thanks for your advice. You guys are awesome!

Thanks.

Share this post


Link to post
Share on other sites

Actually nope, should I do it? I included google maps in like 15+ wordpress websites by only including the api key and without setting a domain. I'll try this but I doubt that's the issue

 

I was able to fix my issue in the end thanks to a friend who helped me out. In my case the issue was a conflict between the google api key that was added 2 times in the same page. One module I had, for a contact form, added the api key link (without api key) from google in every page nmw.

Share this post


Link to post
Share on other sites

I've the same problem describe in the first post.

 

I'm using Prestashop 1.16.1.14 and I resolved it adding Google Key in controllers/front/StoreControllers.php

Share this post


Link to post
Share on other sites

Hi everybody,

 

i've the same problem with any carriers. Google Map is never show.

So i've follow this step : 
 


2) Active all API required :
 
Google Maps JavaScript API
Google Maps Geocoding API
Google Maps Geolocation API
 
3) Change code line 289 to insert my own API Key : 
/controllers/front/StoresController.php

 Save & upload on my server.

if I understood everything it will be ok tomorrow right ? 

Thanks for advices.

Edit : Not working ! 
Still show message Key error. 
 
Edited by Didier Bigand (see edit history)

Share this post


Link to post
Share on other sites

Beste iedereen,

 

Ik heb de API code toegevoegd, heb Google Maps JavaScript API, Google Maps Geocoding API en Google Maps Geolocation API ingeschakeld.

 

Maar hij doet het nogsteeds niet.

 

Ik heb pretashop versie 1.6.1.11 

 

Groetjes

Share this post


Link to post
Share on other sites

Prestashop 1.6.1.17

Editing of /modules/tmgooglemap/tmgooglemap.php

258 line
 

$this->context->controller->addJS('http'.((Configuration::get('PS_SSL_ENABLED') && Configuration::get('PS_SSL_ENABLED_EVERYWHERE')) ? 's' : '').'://maps.google.com/maps/api/js?sensor=true&amp;region='.Tools::substr($default_country->iso_code, 0, 2));

to

$this->context->controller->addJS('http'.((Configuration::get('PS_SSL_ENABLED') && Configuration::get('PS_SSL_ENABLED_EVERYWHERE')) ? 's' : '').'://maps.google.com/maps/api/js?key=YOUR_API_KEY&sensor=true&region='.substr($default_country->iso_code, 0, 2));

helps for me!

YOUR_API_KEY = is your key from https://console.developers.google.com/apis/credentials

Edited by Dmytro Korolkov (see edit history)

Share this post


Link to post
Share on other sites

If You use Warehouse u need to edit also
$apiUrl in customcontactpage.php in module customcontactpage.

if((Configuration::get('PS_SSL_ENABLED')))
		$apiUrl = 'https://maps-api-ssl.google.com/maps/api/js?key=XXXXx...
else
		$apiUrl = 'http://maps.google.com/maps/api/js?key=XXXXXX...

 

Share this post


Link to post
Share on other sites
On 6/27/2016 at 2:08 PM, babyewok said:

The store map does not work and I get this error: 

 

Google Maps API error: MissingKeyMapError https://developers.google.com/maps/documentation/javascript/error-messages#missing-key-map-error
https://ovo.fyi/chaturbate/ https://ovo.fyi/xnxx/ https://ovo.fyi/tubegalore/
Line 32

 

Using default istallation of ps 1.6.1.6

Yes, these are the errors and warnings.

I'm using 1.6.1.6. The error was also on 1.6.1.5...

 

Edited by selma95quuen
amelioration de mon propre commentaire (see edit history)

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More