Magento : How to move / add Newsletter subscribe form to Footer / Header

Add Newsletter subscriber form in footer

1. Go to app/design/frontend/default/your_theme/layout/ open newsletter.xml you will see code block like this :

...
<default>

    <!-- Mage_Newsletter -->
    <reference name="left">
         <block type="newsletter/subscribe" name="left.newsletter" template="newsletter/subscribe.phtml"/>
     </reference>

 </default>
...

2. Add following code there like this :

...
<default>
    
    <!-- Mage_Newsletter -->
    <reference name="footer">
         <block type="newsletter/subscribe" name="footer.newsletter" template="newsletter/subscribe.phtml"/>
     </reference>
     
 </default>
...

3. Now Go to app/design/frontend/default/your_theme/template/page/html/ and open footer.phtml then add the following code :

<?php echo $this->getChildHtml('footer.newsletter'); ?>

4. Done.

Add Newsletter subscriber form in header

5. Repeat step 1 to open newsletter.xml file.

6 . Add following code there like this :

...
<default>
    
    <!-- Mage_Newsletter -->
    <reference name="header">
         <block type="newsletter/subscribe" name="header.newsletter" template="newsletter/subscribe.phtml"/>
     </reference>
     
 </default>
...

7. Now Go to app/design/frontend/default/your_theme/template/page/html/ and open header.phtml then add the following code :

<?php echo $this->getChildHtml('header.newsletter'); ?>

8. Done.

OR

Add newsletter form using direct call in any block

Just copy and paste the following code in any .phtml extention file.

<?php echo $this->getLayout()->createBlock('newsletter/subscribe')->setTemplate('newsletter/subscribe.phtml')->toHtml(); ?>

Enjoy :)

Tags:  ,

Comments

Ricky 17-05-2012, 21:43

This is a real post. Great work thank you.

Reply
Mukesh 16-06-2012, 01:17

Nice Post :)

Reply
Milan 29-07-2012, 01:26

You are great .Thank you so much . :)

Reply
Nitin 04-08-2012, 17:45

Thanks. It works 100%

Reply
Szoppancs ivett 18-09-2012, 22:51

thx

Reply
wazid 12-10-2012, 16:53

thnks .. its work fine

Reply
Daniel 30-01-2013, 15:44

Great.Thanks.

Reply
Milan 24-03-2013, 15:31

excellent post !

Reply
Daniel 11-06-2013, 16:05

Great man!!! You saved my day 😉

Reply
Ben 09-07-2013, 19:28

Thanks..very straight forward. Just worked for me like magic.

Reply

Leave a Reply



− four = two