Hello
Site on Opencart v.3.0.3.7
The Contact page displays a map, but it doesn't work.
It looks like there is a common key for everyone.
I generated a key for my domain, but when I change it in the file /catalog/view/theme/site/template/information/contact.twig , the page stops working altogether.
Line:
<script
src="https://maps.googleapis.com/maps/api/js ... ck=initMap">
</script>
Tell me, what is the problem and how to change the key?
Thank you
Refresh ocmod, clear theme cache, sass cache.
Upgrade Service | OC 2.3.0.2 PHP 8 | My Custom OC 3.0.3.8 | Buy me a beer
To make oc built in google map button works you need to enter the geolocation coordinates like in this snapshot (get your store location value from google maps)
The result will be:
If you didn't able to display google map for you store using google maps API, You can embed google map for free using iframe:
Paste the HTML code in contact.twig
***
Regarding your code in your post; you need to replace the word KEY with your key value.
The result will be:
If you didn't able to display google map for you store using google maps API, You can embed google map for free using iframe:
Paste the HTML code in contact.twig
***
Regarding your code in your post; you need to replace the word KEY with your key value.
Code: Select all
<script
src="https://maps.googleapis.com/maps/api/js?key=KEY&callback=initMap">
</script>
Attachments
gmaps_embed.jpg (153.37 KiB) Viewed 779 times
contact_us.png (14.14 KiB) Viewed 779 times
geocode.png (48.95 KiB) Viewed 779 times
Please add [SOLVED] to the start of the post title.
UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk
Guru Member
Who is online
Users browsing this forum: Google [Bot], niagato, Semrush [Bot] and 649 guests