Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Page 2 of 2
[SOLVED] Add newsletter block to homepage left column
 
Vagabond Jewelry
Sr. Member
 
Total Posts:  83
Joined:  2009-03-14
 

I still have a question, though- how do i “place it in my template”?

 
Magento Community Magento Community
Magento Community
Magento Community
 
Vagabond Jewelry
Sr. Member
 
Total Posts:  83
Joined:  2009-03-14
 

I already modified the newsletter.xml file, if that makes a difference

 
Magento Community Magento Community
Magento Community
Magento Community
 
Vagabond Jewelry
Sr. Member
 
Total Posts:  83
Joined:  2009-03-14
 

and to clarify further- I have it in the right column (yay!) but its at the bottom, and I would prefer it at the top. I have NO IDEA how to go about doing that.

 
Magento Community Magento Community
Magento Community
Magento Community
 
iNetWerx
Jr. Member
 
Total Posts:  7
Joined:  2009-07-10
 

All i had to do was edit the newsletter.xml file. I changed

<reference name=”left”>
<block type="newsletter/subscribe" name="right.newsletter" template="newsletter/subscribe.phtml"/>
</reference>

to <reference name=”right”>
<block type="newsletter/subscribe" name="right.newsletter" template="newsletter/subscribe.phtml"/>
</reference>

and it worked.

PS: and if you find a solution to a problem, please post it to the forum; don’t just mention that you found the solution.

 
Magento Community Magento Community
Magento Community
Magento Community
 
php.balu
Jr. Member
 
Total Posts:  11
Joined:  2009-11-06
 

I seeking help for “how to add additional fields to newsletter”.
i need to add Telephone and name and Zip code fields to Newsletter
how i store this in database and how i retrieve in admin section.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Template fans
Guru
 
Total Posts:  446
Joined:  2009-11-02
 

I also changed the newsletter.xml, that makes a difference

 
Magento Community Magento Community
Magento Community
Magento Community
 
prestigemv
Jr. Member
 
Total Posts:  10
Joined:  2010-02-27
 

newsletter.xml

switch reference “left” to “right”

and that is it. the newsletter block should be on every page. * worked for me no issues*

<!--
Default 
layoutloads most of the pages
-->

    <default>

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

    </default>
 
Magento Community Magento Community
Magento Community
Magento Community
 
Adrian Hart
Jr. Member
 
Avatar
Total Posts:  5
Joined:  2010-02-16
Edinburgh, Scotland
 

You don’t need to modify your XML files.

Simply place this snippet in your template .phtml file where you want the form to appear…

<?php echo $this->getLayout()->createBlock('newsletter/subscribe')->setTemplate('newsletter/subscribe.phtml')->toHtml(); ?>
 
Magento Community Magento Community
Magento Community
Magento Community
 
yamzalal
Jr. Member
 
Total Posts:  3
Joined:  2011-08-26
 
Adrian Hart - 03 August 2011 05:56 AM

You don’t need to modify your XML files.

Simply place this snippet in your template .phtml file where you want the form to appear…

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

Thanks it worked for me.

 
Magento Community Magento Community
Magento Community
Magento Community
 
sungod000
Jr. Member
 
Total Posts:  17
Joined:  2011-11-14
 
Adrian Hart - 03 August 2011 05:56 AM

You don’t need to modify your XML files.

Simply place this snippet in your template .phtml file where you want the form to appear…

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

Worked for 1.7.0.2

Edit:  Had to remove the newsletter from the default left sidebar by editing the newsletter.xml file to this:

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

I changed reference name="left" to “”

 
Magento Community Magento Community
Magento Community
Magento Community
 
briandesp
Jr. Member
 
Total Posts:  18
Joined:  2012-05-11
 
Adrian Hart - 03 August 2011 05:56 AM

You don’t need to modify your XML files.

Simply place this snippet in your template .phtml file where you want the form to appear…

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

AWESOME! Thanks Adrian, This is exactly what i was looking for, i didn’t want to mess around with the xml files, i simply wanted to add the newsletter to a column I created in the footer.

 
Magento Community Magento Community
Magento Community
Magento Community
 
flfreedivers
Jr. Member
 
Total Posts:  1
Joined:  2012-10-08
 
ExactRail - 03 December 2008 03:19 PM

I was able to add this to the CMS for the home page to get the box to show up:

{{block type="newsletter/subscribe" template="newsletter/subscribe.phtml"}}


The form works properly and enters the email address into the system. However, there is no success message for the user to see that the form was successful. I have tried adding the following to the page, but it hasn’t worked either:

{{block type="core/messages" template="core/messages.phtml"}}

Any thoughts?

This worked for me. I just went to CMS-->Static Blocks-->Banner2 and pasted it under my Facebook Logo. Looks great! Thank you for the tip!

{{block type="newsletter/subscribe" template="newsletter/subscribe.phtml"}}

You can check it out on our website http://www.floridafreedivers.com if you wan to see how it looks. =)

 
Magento Community Magento Community
Magento Community
Magento Community
 
Navneet Koshik
Jr. Member
 
Avatar
Total Posts:  6
Joined:  2011-04-20
 

Write below code in your template .phtml file where you want the form to appear…

<?php echo $this->getLayout()->createBlock('newsletter/subscribe')->setTemplate('newsletter/subscribe.phtml')->toHtml(); ?>
 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top
Page 2 of 2