How to add Magento newsletter in footer or Header?

magento.jpeg

To set the Newsletter on Footer also in Header section: Must follow below steps..

FOR THE FOOTER:

Go to app/design/frontend/default/your_theme/layout/ open newsletter.xml

Check the Block like:

    
    
         
     

 

Replace with below code:

    
    
    
         
     
     
 

And Now In Your Footer.phtml file
app/design/frontend/default/your_theme/template/page/html/
add the following code
getChildHtml('footer.newsletter'); ?>

FOR THE HEADER

newsletter.xml
Add this code

    
    
    
         
     
     
 

And Now In Your header.phtml file
app/design/frontend/default/your_theme/template/page/html/
add the following code
getChildHtml('header.newsletter'); ?>

That's it.

OR

We can add in any phtml file by calling direct block.

getLayout()->createBlock('newsletter/subscribe')->setTemplate('newsletter/subscribe.phtml')->toHtml(); ?>

Read: Magento Interview Questions And Answers