- Web templates
- E-commerce Templates
- CMS & Blog Templates
- Facebook Templates
- Website Builders
OpenCart 1.5.x/2.x. How to change map location on home page
March 30, 2015
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:
-
Navigate to catalog\view\theme\themeXXX\template\common folder on FTP.
-
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:
-
To generate the API key, please navigate to Google API console.
-
Click ‘Create Project’:
-
In Services tab on the left select Google Maps JavaScript API v3 and turn it ON:
-
Agree to Google Maps/Google Earth APIs Terms of Service and click ‘Accept’:
-
With that done please navigate to API Access tab on the left and find your API key there:
-
Replace the original API key with your one in catalog\view\theme\themeXXX\template\common\footer.tpl:
Step 3. Set Latitude and Longitude for the location:
-
Go to Google Maps Site.
-
Find your location, right click it. Select ‘What’s Here’ option from the drop down menu:
-
With that done you will see the Latitude and Longitude of the location on the left of the page:
-
Replace the default Latitude and Longitude with yours in the catalog\view\theme\themeXXX\template\common\footer.tpl file:
Feel free to check the detailed video tutorial below: