1

My store sell products of other stores and I would like to know how can i set a map, from Google Maps for example, in product detail page like the image below?

e.g. image

Thanks.

1
  • Does every product page need such a map? Does the map have to point to the same location for all products of your store? Please clarify your question.
    – MatthijsIJ
    Commented Dec 16, 2014 at 13:00

1 Answer 1

1

Go to google maps and enter your desired location now click on settings button which is in bottom right enter image description here

select share or embeded maps->embed map option select your desired size copy the <iframe> code.

Now goto CMS->static Blocks create a new block and paste the <iframe> code in content section.

now call this static block in your product page using catalog.xml file in this way

<reference name="content">
<block type="cms/block" name="your_block_name">
  <action method="setBlockId"><block_id>your_block_id</block_id>
  </action>
</block>
</reference> 
3
  • It's working. Thanks dude :) Just one more question. Is it possible to create a attribute and then set this attribute on product detail page? Thanks again.
    – Michel
    Commented Dec 16, 2014 at 15:33
  • No it is not possible.
    – dh47
    Commented Dec 17, 2014 at 4:24
  • Yes, it's possible. I created un attribute that call "maps". Then i added the code: <?php echo $_helper->productAttribute($_product, nl2br($_product->getmaps()), 'maps') ?> into view.phtml file (app/design/frontend/rwd/default/template/catalog/product/view.phtml) and worked. :)
    – Michel
    Commented Dec 18, 2014 at 13:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.