How To Add A Map For Every Product View PageDisplaying different currencies for a single productMap in product detail pageHow to get Product Submit Url on Category page?How to add different prices for the same product?Display product name from different store view in adminhow to choose the same theme for each store-viewSome product but diffrent attribute for each store viewIntegrate a Micro Shop in a CMS out of MagentoMagento 1.9 - Why different Product URL for different StoreHow to get configurable product options on associated product page?
Invariance of results when scaling explanatory variables in logistic regression, is there a proof?
How to deal with loss of decision making power over a change?
Java - What do constructor type arguments mean when placed *before* the type?
Can a Gentile theist be saved?
How can I successfully establish a nationwide combat training program for a large country?
Why are all the doors on Ferenginar (the Ferengi home world) far shorter than the average Ferengi?
How will losing mobility of one hand affect my career as a programmer?
Simple image editor tool to draw a simple box/rectangle in an existing image
What should I use for Mishna study?
Should my PhD thesis be submitted under my legal name?
You're three for three
Is it possible to have a strip of cold climate in the middle of a planet?
Can the electrostatic force be infinite in magnitude?
Greatest common substring
Simulating a probability of 1 of 2^N with less than N random bits
Can somebody explain Brexit in a few child-proof sentences?
I'm in charge of equipment buying but no one's ever happy with what I choose. How to fix this?
How can I raise concerns with a new DM about XP splitting?
Is there an wasy way to program in Tikz something like the one in the image?
My boss asked me to take a one-day class, then signs it up as a day off
Is it possible to build a CPA Secure encryption scheme which remains secure even when the encryption of secret key is given?
A known event to a history junkie
Teaching indefinite integrals that require special-casing
How do I repair my stair bannister?
How To Add A Map For Every Product View Page
Displaying different currencies for a single productMap in product detail pageHow to get Product Submit Url on Category page?How to add different prices for the same product?Display product name from different store view in adminhow to choose the same theme for each store-viewSome product but diffrent attribute for each store viewIntegrate a Micro Shop in a CMS out of MagentoMagento 1.9 - Why different Product URL for different StoreHow to get configurable product options on associated product page?
I have a coffee store based shop in magento . Now i want to show the map for each coffee shop in the product view

every store has its different location for google map. any help would be very thankful and appreciable. there are different store google map store extension but i want to show on the product page and each product has its different google map location how we can do this?
I can copy a iframe google map which place in the static blog and called the static block in the view.phtml page but it is for only one product i want to call different maps based on different product
magento-1.9 google-map
bumped to the homepage by Community♦ 8 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
add a comment |
I have a coffee store based shop in magento . Now i want to show the map for each coffee shop in the product view

every store has its different location for google map. any help would be very thankful and appreciable. there are different store google map store extension but i want to show on the product page and each product has its different google map location how we can do this?
I can copy a iframe google map which place in the static blog and called the static block in the view.phtml page but it is for only one product i want to call different maps based on different product
magento-1.9 google-map
bumped to the homepage by Community♦ 8 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
add a comment |
I have a coffee store based shop in magento . Now i want to show the map for each coffee shop in the product view

every store has its different location for google map. any help would be very thankful and appreciable. there are different store google map store extension but i want to show on the product page and each product has its different google map location how we can do this?
I can copy a iframe google map which place in the static blog and called the static block in the view.phtml page but it is for only one product i want to call different maps based on different product
magento-1.9 google-map
I have a coffee store based shop in magento . Now i want to show the map for each coffee shop in the product view

every store has its different location for google map. any help would be very thankful and appreciable. there are different store google map store extension but i want to show on the product page and each product has its different google map location how we can do this?
I can copy a iframe google map which place in the static blog and called the static block in the view.phtml page but it is for only one product i want to call different maps based on different product
magento-1.9 google-map
magento-1.9 google-map
edited Aug 14 '16 at 13:45
Tayyab Gulsher Vohra
asked Aug 14 '16 at 12:34
Tayyab Gulsher Vohra Tayyab Gulsher Vohra
12
12
bumped to the homepage by Community♦ 8 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
bumped to the homepage by Community♦ 8 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
You can just create 2 attributes: "lat" and "lng" (latitude, longitude) (see here http://www.templatemonster.com/help/magento-how-to-create-an-attribute-and-apply-it-to-products.html)
Then copy /templates/catalog/product/view.phtml to your theme folder and insert this code into right place. (code from example of google map api
https://developers.google.com/maps/documentation/javascript/examples/marker-simple)
<?php
$_helper = $this->helper('catalog/output');
$lat = $_helper->productAttribute($_product, $_product->getLat(), 'lat');
$lng = $_helper->productAttribute($_product, $_product->getLat(), 'lng');
?>
<div id="map"></div>
<script>
function initMap()
var myLatLng = lat: <?php echo $lat; ?>, lng: <?php echo $lng; ?>;
var map = new google.maps.Map(document.getElementById('map'),
zoom: 4,
center: myLatLng
);
var marker = new google.maps.Marker(
position: myLatLng,
map: map,
title: 'Hello World!'
);
</script>
hope this helps.
add a comment |
You may like using this module : https://github.com/Smile-SA/magento2-module-map that allow to wrap Google Map more easily in Magento.
An example usage can be found here :
* Template : https://github.com/Smile-SA/magento2-module-store-locator/blob/master/view/frontend/templates/view/map.phtml and here
* Block : https://github.com/Smile-SA/magento2-module-store-locator/blob/master/Block/View/Map.php
More information available here : https://github.com/Smile-SA/elasticsuite-for-retailer, but you will require only the smile/module-map for your use case
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "479"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f131381%2fhow-to-add-a-map-for-every-product-view-page%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
You can just create 2 attributes: "lat" and "lng" (latitude, longitude) (see here http://www.templatemonster.com/help/magento-how-to-create-an-attribute-and-apply-it-to-products.html)
Then copy /templates/catalog/product/view.phtml to your theme folder and insert this code into right place. (code from example of google map api
https://developers.google.com/maps/documentation/javascript/examples/marker-simple)
<?php
$_helper = $this->helper('catalog/output');
$lat = $_helper->productAttribute($_product, $_product->getLat(), 'lat');
$lng = $_helper->productAttribute($_product, $_product->getLat(), 'lng');
?>
<div id="map"></div>
<script>
function initMap()
var myLatLng = lat: <?php echo $lat; ?>, lng: <?php echo $lng; ?>;
var map = new google.maps.Map(document.getElementById('map'),
zoom: 4,
center: myLatLng
);
var marker = new google.maps.Marker(
position: myLatLng,
map: map,
title: 'Hello World!'
);
</script>
hope this helps.
add a comment |
You can just create 2 attributes: "lat" and "lng" (latitude, longitude) (see here http://www.templatemonster.com/help/magento-how-to-create-an-attribute-and-apply-it-to-products.html)
Then copy /templates/catalog/product/view.phtml to your theme folder and insert this code into right place. (code from example of google map api
https://developers.google.com/maps/documentation/javascript/examples/marker-simple)
<?php
$_helper = $this->helper('catalog/output');
$lat = $_helper->productAttribute($_product, $_product->getLat(), 'lat');
$lng = $_helper->productAttribute($_product, $_product->getLat(), 'lng');
?>
<div id="map"></div>
<script>
function initMap()
var myLatLng = lat: <?php echo $lat; ?>, lng: <?php echo $lng; ?>;
var map = new google.maps.Map(document.getElementById('map'),
zoom: 4,
center: myLatLng
);
var marker = new google.maps.Marker(
position: myLatLng,
map: map,
title: 'Hello World!'
);
</script>
hope this helps.
add a comment |
You can just create 2 attributes: "lat" and "lng" (latitude, longitude) (see here http://www.templatemonster.com/help/magento-how-to-create-an-attribute-and-apply-it-to-products.html)
Then copy /templates/catalog/product/view.phtml to your theme folder and insert this code into right place. (code from example of google map api
https://developers.google.com/maps/documentation/javascript/examples/marker-simple)
<?php
$_helper = $this->helper('catalog/output');
$lat = $_helper->productAttribute($_product, $_product->getLat(), 'lat');
$lng = $_helper->productAttribute($_product, $_product->getLat(), 'lng');
?>
<div id="map"></div>
<script>
function initMap()
var myLatLng = lat: <?php echo $lat; ?>, lng: <?php echo $lng; ?>;
var map = new google.maps.Map(document.getElementById('map'),
zoom: 4,
center: myLatLng
);
var marker = new google.maps.Marker(
position: myLatLng,
map: map,
title: 'Hello World!'
);
</script>
hope this helps.
You can just create 2 attributes: "lat" and "lng" (latitude, longitude) (see here http://www.templatemonster.com/help/magento-how-to-create-an-attribute-and-apply-it-to-products.html)
Then copy /templates/catalog/product/view.phtml to your theme folder and insert this code into right place. (code from example of google map api
https://developers.google.com/maps/documentation/javascript/examples/marker-simple)
<?php
$_helper = $this->helper('catalog/output');
$lat = $_helper->productAttribute($_product, $_product->getLat(), 'lat');
$lng = $_helper->productAttribute($_product, $_product->getLat(), 'lng');
?>
<div id="map"></div>
<script>
function initMap()
var myLatLng = lat: <?php echo $lat; ?>, lng: <?php echo $lng; ?>;
var map = new google.maps.Map(document.getElementById('map'),
zoom: 4,
center: myLatLng
);
var marker = new google.maps.Marker(
position: myLatLng,
map: map,
title: 'Hello World!'
);
</script>
hope this helps.
answered Aug 14 '16 at 15:54
Ігор КлимчукІгор Климчук
1,155615
1,155615
add a comment |
add a comment |
You may like using this module : https://github.com/Smile-SA/magento2-module-map that allow to wrap Google Map more easily in Magento.
An example usage can be found here :
* Template : https://github.com/Smile-SA/magento2-module-store-locator/blob/master/view/frontend/templates/view/map.phtml and here
* Block : https://github.com/Smile-SA/magento2-module-store-locator/blob/master/Block/View/Map.php
More information available here : https://github.com/Smile-SA/elasticsuite-for-retailer, but you will require only the smile/module-map for your use case
add a comment |
You may like using this module : https://github.com/Smile-SA/magento2-module-map that allow to wrap Google Map more easily in Magento.
An example usage can be found here :
* Template : https://github.com/Smile-SA/magento2-module-store-locator/blob/master/view/frontend/templates/view/map.phtml and here
* Block : https://github.com/Smile-SA/magento2-module-store-locator/blob/master/Block/View/Map.php
More information available here : https://github.com/Smile-SA/elasticsuite-for-retailer, but you will require only the smile/module-map for your use case
add a comment |
You may like using this module : https://github.com/Smile-SA/magento2-module-map that allow to wrap Google Map more easily in Magento.
An example usage can be found here :
* Template : https://github.com/Smile-SA/magento2-module-store-locator/blob/master/view/frontend/templates/view/map.phtml and here
* Block : https://github.com/Smile-SA/magento2-module-store-locator/blob/master/Block/View/Map.php
More information available here : https://github.com/Smile-SA/elasticsuite-for-retailer, but you will require only the smile/module-map for your use case
You may like using this module : https://github.com/Smile-SA/magento2-module-map that allow to wrap Google Map more easily in Magento.
An example usage can be found here :
* Template : https://github.com/Smile-SA/magento2-module-store-locator/blob/master/view/frontend/templates/view/map.phtml and here
* Block : https://github.com/Smile-SA/magento2-module-store-locator/blob/master/Block/View/Map.php
More information available here : https://github.com/Smile-SA/elasticsuite-for-retailer, but you will require only the smile/module-map for your use case
answered Mar 5 '18 at 14:01
Aurélien FOUCRETAurélien FOUCRET
1766
1766
add a comment |
add a comment |
Thanks for contributing an answer to Magento Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f131381%2fhow-to-add-a-map-for-every-product-view-page%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown