Post by scottyboyyy » Thu May 03, 2018 6:07 am

I am a beginner with javascript and I am trying to merge Google Maps API with my Opencart site.

I am trying to display my Open Cart products as markers on the map.

I have made a copy of the category and named it map. It currently has all the values I need for every product / marker already on the page but in php, but my problem is merging the two so that it shows in javascript.

I have the values currently and they show as PHP:

<?php foreach ($products as $product) { ?>

<?php echo $product['name']; ?>
<?php echo $product['lat']; ?>
<?php echo $product['long']; ?>

Is there an easy way to do this? Or is it not possible like this?

New member


Fri Apr 07, 2017 2:36 am
Who is online

Users browsing this forum: No registered users and 5 guests