Question

How to add google map under contact us page after submit button

this is the code for contact us page -form.phtml = > http://pastebin.com/rSYMpu5X

Was it helpful?

Solution

To add a Google Maps below your contact form you do this thru adding a stocking block thru your local.xml:

First create a static block: Name: Google Maps Identifier: googlemaps Store: Select your store Content: Insert the Google Maps include code

Next edit the local.xml file in your theme (app/design/frontend/[package]/[template]/layout/local.xml) and add the following code:

        <contacts_index_index>
                <reference name='content'>
                        <block type="cms/block" name="mapsblock">
                                <action method="setBlockId"><block_id>googlemaps</block_id></action>
                        </block>
                </reference>
        </contacts_index_index>

If there is no local.xml in your theme create one, complete XML for this file:

<?xml version="1.0"?>
<layout>
        <contacts_index_index>
                <reference name='content'>
                        <block type="cms/block" name="mapsblock">
                                <action method="setBlockId"><block_id>googlemaps</block_id></action>
                        </block>
                </reference>
        </contacts_index_index>
</layout>
Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top