Sipke
Total Posts: 10
Joined: 2008-03-26
I am trying to get the newsletter sign up block on the homepage screen, but I’m stuck. I’m struggling with this and don’t know where to start or how to do this. Can anybody explain what to do?
Posted: June 10 2008
| top
sherrie
Total Posts: 1652
Joined: 2007-12-14
Illinois, USA
I did this ... but I don’t remember off the top of my head how - I know that I used the default template as a guide though because that’s where it’s located in the default template.
Make sure you refresh your cache - it’s one of those changes you definitely can’t see otherwise.
Signature
UX Manager, Sweet Tooth
Creativity is falling in love with the world. – Dewitt Jones
I’m a very random person, catch me if you can: http://www.twitter.com/sherrierohde
Posted: June 10 2008
| top
| # 1
sherrie
Total Posts: 1652
Joined: 2007-12-14
Illinois, USA
Ok, these are what my files look like with the newsletter in the left column (http://www.minervapromotions.com/ihsa ):
app/design/frontend/default/TEMPLATE/template/newsletter/subscribe.phtml
< div class= "box base-mini mini-newsletter" > < div class= "head" > < h4 > <?php echo $this -> __ ( 'Newsletter' ) ?> < a name = "newsletter-box" ></ a ></ h4 > </ div > < form action = "<?php echo $this->getUrl('newsletter/subscriber/new') ?>" method = "post" id = "newsletter-validate-detail" > < fieldset class= "content" > < label for= "newsletter" > <?php echo $this -> __ ( 'Sign up for our newsletter' ) ?> :</ label > < div class= "input-box" > <!-- Created for the validation error accomodation --> < input name = "email" type = "text" id = "newsletter" value = "Enter your email address" class= "required-entry validate-email input-text" /> </ div > < input type = "image" src = "<?php echo $this->getSkinUrl('images/btn_submit_mini.gif') ?>" value = "<?php echo $this->__('Sign me up') ?>" /> </ fieldset > </ form > </ div > < script type = "text/javascript" > <!-- var newsletterSubscriberFormDetail = new VarienForm ( 'newsletter-validate-detail' ); new Varien . searchForm ( 'newsletter-validate-detail' , 'newsletter' , '<?php echo $this->helper(' newsletter ')->__(' Enter your email address ') ?>' ); //--> </script>
app/design/frontend/default/TEMPLATE/layout/page.xml (This one doesn’t seem right to me, but it’s working.)
< block type = "page/html_footer" name = "footer" as= "footer" template = "page/html/footer.phtml" > < block type = "page/switch" name = "store_switcher" as= "store_switcher" template = "page/switch/stores.phtml" /> < block type = "newsletter/subscribe" name = "newsletter" as= "newsletter" template = "newsletter/subscribe.phtml" /> < block type = "page/template_links" name = "footer_links" as= "footer_links" template = "page/template/footer_links.phtml" /> </ block >
skin/frontend/default/TEMPLATE/css/boxes.css
. mini - newsletter . head { background : url (../ images / base - mini - bg . jpg ) no - repeat ; } . mini - newsletter . head h4 { text - align : left ! important ; } . mini - newsletter . input - text { margin : 5px 0px 5px 0px ; width : 170px ; }
Signature
UX Manager, Sweet Tooth
Creativity is falling in love with the world. – Dewitt Jones
I’m a very random person, catch me if you can: http://www.twitter.com/sherrierohde
Posted: June 10 2008
| top
| # 2
Sipke
Total Posts: 10
Joined: 2008-03-26
I can’t get this working. There should be a easier way to get the newsletter sign-up box on every page?
Posted: June 18 2008
| top
| # 3
BoostMyShop
Total Posts: 151
Joined: 2008-06-11
France
Sipke - 17 June 2008 07:56 PM
I can’t get this working. There should be a easier way to get the newsletter sign-up box on every page?
i agree.
here is an example to move cart box : http://www.magentocommerce.com/design_guide/articles/intro-to-layouts
you should be able to do it editing xml files…
however explanation are not right for me: i understand phtml using but not layout ....
Signature
________________________________________________
Find out our extensions :
Magento Embedded ERP : a set of extension to embeded an ERP within Magento !
Magento Customer Quote : send custom quote to your customer or enable quote request from you website !
Posted: June 18 2008
| top
| # 4
Thejosh13
Total Posts: 252
Joined: 2008-06-23
I am also looking to add the Newsletter block to the left column of the homepage, Is there a way to just add it to the CMS Manage Pages?
Posted: August 1 2008
| top
| # 5
Thejosh13
Total Posts: 252
Joined: 2008-06-23
I cant seem to figure out how to add the right code?
Posted: August 1 2008
| top
| # 6
lotusseedsD
Total Posts: 1144
Joined: 2007-08-31
it really simple.
1. open up newsletter.xml, just change the reference name from ‘left’ to ‘right’, ‘footer’ to ‘header’, or ‘right’ to left
<default>
<!-- Mage_Newsletter -->
<reference name="left">
<block type="newsletter/subscribe" as="newsletter" name="newsletter" template="newsletter/subscribe.phtml"/>
</reference>
</default>
then place it in your template
newsletter sign up for Default theme already is on the left.
Modern theme is placed in the ‘page > html> footer.phtml’. To move it from footer to left, just cut this out ‘ <?php echo $this->getChildHtml('newsletter') ?>’, place it in the temple, something like this, after the ‘left’:
<?php echo $this->getChildHtml('left') ?>
<?php echo $this->getChildHtml('newsletter') ?>
but of course, if you use a one column template for your homepage then it wont’ show up because one column only reference to ‘content’.
Signature
Accessible, WCAG 2.0 HTML5 Magento/WordPress Development & Magento themes:
Latest release : Green Path Premium Theme | : Touchscreen Optimized Mobile Theme
Posted: August 2 2008
| top
| # 7
craigboi87
Total Posts: 90
Joined: 2008-07-18
can i ask where the newsletter.xml file is?
Posted: October 21 2008
| top
| # 8
validBen
Total Posts: 13
Joined: 2008-10-22
all the xml files from a theme are situated in your Magento folder in:
app > design > frontend > default > ThemeName > layout
Signature
Best premium WordPress themes
Posted: October 22 2008
| top
| # 9
ctilp
Total Posts: 16
Joined: 2008-04-01
chinesedream - 01 August 2008 07:16 PM
it really simple.
1. open up newsletter.xml, just change the reference name from ‘left’ to ‘right’, ‘footer’ to ‘header’, or ‘right’ to left
<default>
<!-- Mage_Newsletter -->
<reference name="left">
<block type="newsletter/subscribe" as="newsletter" name="newsletter" template="newsletter/subscribe.phtml"/>
</reference>
</default>
then place it in your template
newsletter sign up for Default theme already is on the left.
Modern theme is placed in the ‘page > html> footer.phtml’. To move it from footer to left, just cut this out ‘ <?php echo $this->getChildHtml('newsletter') ?>’, place it in the temple, something like this, after the ‘left’:
<?php echo $this->getChildHtml('left') ?>
<?php echo $this->getChildHtml('newsletter') ?>
but of course, if you use a one column template for your homepage then it wont’ show up because one column only reference to ‘content’.
Lets say that I want newsletter to be in a div i made in /app/design/frontend/default/default/template/page , i’ve open the newsletter.xml and gave it the positionname, and deleted it from the other xml files, where it had callouts.
Posted: October 28 2008
| top
| # 10
ExactRail
Total Posts: 14
Joined: 2008-08-28
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?
Posted: December 4 2008
| top
| # 11
ExactRail
Total Posts: 14
Joined: 2008-08-28
I figured it out…
I found this in app/design/frontend/default/default/template/page/3columns.phtml:
<?php echo $this -> getChildHtml ( 'global_messages' ) ?>
The home page template I was using was actually using 1column.phtml; which does not contain this line.
I added it like so…
<!-- start middle --> < div class= "middle-container" > < div class= "middle col-1-layout" > <?php echo $this -> getChildHtml ( 'breadcrumbs' ) ?> <!-- start center --> < div id = "main" class= "col-main" > <!-- start global messages --> <?php echo $this -> getChildHtml ( 'global_messages' ) ?> <!-- end global messages --> <!-- start content --> <?php echo $this -> getChildHtml ( 'content' ) ?> <!-- end content -->
and now it works great!
Posted: December 6 2008
| top
| # 12
MacKniven
Total Posts: 51
Joined: 2009-01-09
XML solution worked great for me! Remember and refresh the cache though
Thanks guys!
Vagabond Jewelry
Total Posts: 83
Joined: 2009-03-14
I’m sorry guys- I’m just not getting this wo work. My Newsletter subscribe box wants to be on the left. I want my newsletter subscribe box on the right. Useing CMS, I WAS able to get it into the footer- but- somehow it got there without the text. It’s just a textbox and the button subscribe, nothing about newlsletters. a little confusing, and, anyway, the footer isn’t wher I want it. I want it on the right. Is there a CMS way to do this, or must it be XML?
My XML currently looks like this:
<default>
<!-- Mage_Checkout -->
<reference name="top.links">
<block type="checkout/links" name="checkout_cart_link">
<action method="addCartLink"></action>
<action method="addCheckoutLink"></action>
</block>
</reference>
<reference name="right">
<block type="checkout/cart_sidebar" name="cart_sidebar" template="checkout/cart/sidebar.phtml" before="-">
<action method="addItemRender"><type>simple</type><block>checkout/cart_item_renderer</block><template>checkout/cart/sidebar/default.phtml</template></action>
<action method="addItemRender"><type>grouped</type><block>checkout/cart_item_renderer_grouped</block><template>checkout/cart/sidebar/default.phtml</template></action>
<action method="addItemRender"><type>configurable</type><block>checkout/cart_item_renderer_configurable</block><template>checkout/cart/sidebar/default.phtml</template></action>
</block>
</reference>
</default>
If I do need to do XML, what, really, am I changing? I can’t find a left to change to right. I don’t think that’s even the page I’m trying to modify, as it clearly states it is the checkout, but everything in my newsletter.xml says checkout. I’m having trouble....
Thanks for any help,
Kest
Vagabond Jewelry
Total Posts: 83
Joined: 2009-03-14
Whoe- nevermind. I was being EXCEPTIONALLY dumb. Had the wrong file open. Wee. Sorry. damn.