If this tutorial is not what you were looking for, you still have any questions, suggestions or concerns - feel free to let us know. Please help us to serve you better!

Your Name

Your Email

Your Message (required)

captcha

OpenCart 1.5.x/2.x. How to change map location on home page

This tutorial shows how to change the map location on home page in OpenCart 1.5.x/2.x.

OpenCart 1.5.x/2.x. How to change map location on home page

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 catalog\view\theme\themeXXX\template\common folder on FTP.

  2. Open footer.tpl file and you will see the default Map link with a Google API key (appr.line11):

    How to change map location on home page1

Step 2. Generate the API key:

  1. To generate the API key, please navigate to Google API console.

  2. Click ‘Create Project’:

    How to change map location on home page2

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

    How to change map location on home page3

    How to change map location on home page4

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

    How to change map location on home page5

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

    How to change map location on home page6

  6. Replace the original API key with your one in catalog\view\theme\themeXXX\template\common\footer.tpl:

    How to change map location on home page7

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:

    How to change map location on home page8

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

    How to change map location on home page9

  4. Replace the default Latitude and Longitude with yours in the catalog\view\theme\themeXXX\template\common\footer.tpl file:

    How to change map location on home page10

Feel free to check the detailed video tutorial below:

OpenCart 1.5.x/2.x. How to change map location on home page