How to change map location on home page in OpenCart

How to change map location on home page in OpenCart

In order to change map location on home page, you should perform the following:

Step 1. Locate the Google Map code in the template:

  1. Navigate to catalogviewthemethemeXXXtemplatecommon folder on FTP.
  2. Open footer.tpl file and you will see the default Map link with a Google API key (appr.line11):


Step 2. Generate the API key:

  1. To generate the API key, please navigate to Google API console.
  2. Click ‘Create Project’


  3. In Services tab on the left select Google Maps JavaScript API v3 and turn it ON.



  4. Agree to Google Maps/Google Earth APIs Terms of Service and click ‘Accept’.


  5. With that done please navigate to API Access tab on the left and find your API key there.


  6. Replace the original API key with your one in catalogviewthemethemeXXXtemplatecommonfooter.tpl.


Step 3. Set Latitude and Longitude for the location.

  1. Go to Google Maps Site.
  2. Find your location, right click it. Select ‘What’s Here’ option from the drop down menu.


  3. With that done you will see the Latitude and Longitude of the location on the left of the page:


  4. Replace the default Latitude and Longitude with yours in the catalogviewthemethemeXXXtemplatecommonfooter.tpl file.

Was this article helpful?

Related Articles

Leave A Comment?

You must be logged in to post a comment.