How to Add Newsletter Subscribe Form In Footer And Header In Magento.?
Add Newsletter Subscribe Form To Footer / Header In Magento :-
Sometimes we need too move our Newsletter Subscribe form or other Magento blocks, from their original position in your Magento template .you would need to go and find the relevant lines in the layout XML files and modify them to show in a new position respectively. This however was a tedious process, especially when it came to precise positioning on your page.
Magento Add Newsletter subscriber form in Footer
Step 1:- To add Newsletter subscription box to footer of Magento, Go to app/design/frontend/default/yourtheme/layout/ newsletter.xml and open newsletter.xml & find the following code.
<default> <!-- Mage_Newsletter --> <reference name="left"> <block type="newsletter/subscribe" name="left.newsletter" template="newsletter/subscribe.phtml"/> </reference> </default>
Step 2:- Now replace the above with the below code to make it appear on the footer of the Magento.
<default> <!-- Mage_Newsletter --> <reference name="footer"> <block type="newsletter/subscribe" name="footer.newsletter" template="newsletter/subscribe.phtml"/> </reference> </default>
Step 3:-Now Go to app/design/frontend/default/yourtheme/template/page/html/footer.html and open footer.phtml then add the below code :
<?php echo $this->getChildHtml('footer.newsletter'); ?>
Magento Add Newsletter subscriber form in header:-
Step 1:- For adding again go to app/design/frontend/default/yourtheme/layout/newsletter.xml to find the name of block to call, then change it to header.newsletter for making effective change accordingly.
<default> <!-- Mage_Newsletter --> <reference name="footer"> <block type="newsletter/subscribe" name="header.newsletter" template="newsletter/subscribe.phtml"/> </reference> </default>
Step 2:-Now again go To app/design/frontend/default/yourtheme/template/page/html/header.phtml add the following corresponding code.
<?php echo $this->getChildHtml('header.newsletter'); ?>