If you’re looking to add a static block to your contact us page in Magento Commerce, it’s really quite easy.
First log in to you Magento admin panel. Go to CMS>>Static Blocks.
Click add new block.
Put in your title (this is for your reference) and then the identifier. The identifier must be a unique name and have no spaces. Something like contact_our_store.
Select which store this is for if you have more than one in your Magento installation.
Put in you content and whatever contact information you want to display on the page.
Then
Select the Enable selection and Save your static block.
Now, navigate on your server to app/design/frontend/default/YOURTHEME/template/contacts/form.phtml and open that file in a proper text editor.
Make sure you SAVE A COPY of the file before you do anything!
For this example, you would add this code:
<!–Added Static Block–>
<table width=”100%” border=”0″ cellspacing=”4″ cellpadding=”4″>
<tr>
<td>
<?php echo $this->getLayout()->createBlock(’cms/block’)->setBlockId(’contact_our_store’)->toHtml() ?>
</td>
</tr>
</table>
The above code needs to be added just ABOVE the following code:
<form action=”<?php echo $this->getFormAction(); ?>” id=”contactForm” method=”post”>
Save the file.
You may need to go to Magento admin and refresh your cache.
Then, go checkout your contact page.
If everything is right, you should now have your static block information on your contact us page in your Magento shop!
