Jump to content

Store Locator, Google now requires API Key


SBD

Recommended Posts

A recent google maps update now requires the creation of an API key to access the maps feature.

For a time, URL's previously used to access the map will continue to function, but new stores will require their own key.

 

This results in the store map feature;

Preferences => Store Contacts => Show simplified store locator=NO

first showing the map briefly, then an error message;

 

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

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

 

A guide to obtaining and implementing the key is here

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

 

 

 

 

But, I've no idea how to get it into Presta Shop, I can't find where the maps function is called from.

 

Obviously the interface is going to need to be altered in future to allow a key to be entered.  For the time being, does anyone know where it can be edited in?

Link to comment
Share on other sites

It's relatively simple if you've set up the API correctly.

The code is found in: \controllers\front\StoresController.php
 
Look for the code:


Add ?key=[YOUR API KEY] after //maps.google.com/maps/api/js &plus any other parameters.

Hope that helps?

Edited by davidell (see edit history)
  • Like 1
Link to comment
Share on other sites

  • 2 weeks later...
  • 1 month later...
  • 3 months later...

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...