<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	>
<channel>
	<title>Comments on: How to redirect Magento newsletter url</title>
	<atom:link href="http://webdevster.com/ecommerce/magento/to-redirect-a-newsletter-subscriber-to-a-landing-page-url/feed" rel="self" type="application/rss+xml" />
	<link>http://webdevster.com/ecommerce/magento/to-redirect-a-newsletter-subscriber-to-a-landing-page-url</link>
	<description>Web Development Blog</description>
	<pubDate>Fri, 18 May 2012 06:32:21 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Ross Melvi Monserate</title>
		<link>http://webdevster.com/ecommerce/magento/to-redirect-a-newsletter-subscriber-to-a-landing-page-url/comment-page-1#comment-1573</link>
		<dc:creator>Ross Melvi Monserate</dc:creator>
		<pubDate>Thu, 05 May 2011 09:28:14 +0000</pubDate>
		<guid isPermaLink="false">http://webdevster.com/?p=819#comment-1573</guid>
		<description>I got it worked with this very simple solution, you just have to change the confirmation message:

  $status = Mage::getModel('newsletter/subscriber')-&#62;subscribe($email);
                if ($status == Mage_Newsletter_Model_Subscriber::STATUS_NOT_ACTIVE) {
                    $session-&#62;addSuccess($this-&#62;__('Confirmation request has been sent.'));
                }
                else {
                    $session-&#62;addSuccess($this-&#62;__('Thank you for your subscription.'));
                }


TO


 $status = Mage::getModel('newsletter/subscriber')-&#62;subscribe($email);
                if ($status == Mage_Newsletter_Model_Subscriber::STATUS_NOT_ACTIVE) {
                    $session-&#62;addSuccess($this-&#62;__('location = "/newsletter-subscribe(or whatever page you wanted";'));
                }
                else {
                    $session-&#62;addSuccess($this-&#62;__('location = "/newsletter-subscribe";'));
                }</description>
		<content:encoded><![CDATA[<p>I got it worked with this very simple solution, you just have to change the confirmation message:</p>
<p>  $status = Mage::getModel(&#8217;newsletter/subscriber&#8217;)-&gt;subscribe($email);<br />
                if ($status == Mage_Newsletter_Model_Subscriber::STATUS_NOT_ACTIVE) {<br />
                    $session-&gt;addSuccess($this-&gt;__(&#8217;Confirmation request has been sent.&#8217;));<br />
                }<br />
                else {<br />
                    $session-&gt;addSuccess($this-&gt;__(&#8217;Thank you for your subscription.&#8217;));<br />
                }</p>
<p>TO</p>
<p> $status = Mage::getModel(&#8217;newsletter/subscriber&#8217;)-&gt;subscribe($email);<br />
                if ($status == Mage_Newsletter_Model_Subscriber::STATUS_NOT_ACTIVE) {<br />
                    $session-&gt;addSuccess($this-&gt;__(&#8217;location = &#8220;/newsletter-subscribe(or whatever page you wanted&#8221;;&#8217;));<br />
                }<br />
                else {<br />
                    $session-&gt;addSuccess($this-&gt;__(&#8217;location = &#8220;/newsletter-subscribe&#8221;;&#8217;));<br />
                }</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Web Development Company</title>
		<link>http://webdevster.com/ecommerce/magento/to-redirect-a-newsletter-subscriber-to-a-landing-page-url/comment-page-1#comment-1471</link>
		<dc:creator>Web Development Company</dc:creator>
		<pubDate>Thu, 03 Feb 2011 05:09:00 +0000</pubDate>
		<guid isPermaLink="false">http://webdevster.com/?p=819#comment-1471</guid>
		<description>These are great tips. Find your post very informative. Thanks a lot!</description>
		<content:encoded><![CDATA[<p>These are great tips. Find your post very informative. Thanks a lot!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Shaun E</title>
		<link>http://webdevster.com/ecommerce/magento/to-redirect-a-newsletter-subscriber-to-a-landing-page-url/comment-page-1#comment-1447</link>
		<dc:creator>Shaun E</dc:creator>
		<pubDate>Mon, 06 Dec 2010 12:50:33 +0000</pubDate>
		<guid isPermaLink="false">http://webdevster.com/?p=819#comment-1447</guid>
		<description>Woops looks like Wordpress stripped out a bunch of the xml tags I pasted in... I'll try one more time.
&#60;frontend&#62;
&#60;events&#62;
    &#60;controller_action_postdispatch_newsletter_subscriber_new&#62;
	&#60;observers&#62;
	    &#60;newsletter_subscribe_observer&#62;
		&#60;type&#62;singleton&#60;/type&#62;
		&#60;class&#62;yourmodule/observer&#60;/class&#62;
		&#60;method&#62;redirectNewsletterSuccess&#60;/method&#62;
	    &#60;/newsletter_subscribe_observer&#62;
	&#60;/observers&#62;
    &#60;/controller_action_postdispatch_newsletter_subscriber_new&#62;
    &#60;controller_action_postdispatch_newsletter_subscriber_confirm&#62;
	&#60;observers&#62;
	    &#60;newsletter_subscribe_observer&#62;
		&#60;type&#62;singleton&#60;/type&#62;
		&#60;class&#62;yourmodule/observer&#60;/class&#62;
		&#60;method&#62;redirectNewsletterConfirm&#60;/method&#62;
	    &#60;/newsletter_subscribe_observer&#62;
	&#60;/observers&#62;
    &#60;/controller_action_postdispatch_newsletter_subscriber_confirm&#62;
&#60;/events&#62;
&#60;/frontend&#62;</description>
		<content:encoded><![CDATA[<p>Woops looks like Wordpress stripped out a bunch of the xml tags I pasted in&#8230; I&#8217;ll try one more time.<br />
&lt;frontend&gt;<br />
&lt;events&gt;<br />
    &lt;controller_action_postdispatch_newsletter_subscriber_new&gt;<br />
	&lt;observers&gt;<br />
	    &lt;newsletter_subscribe_observer&gt;<br />
		&lt;type&gt;singleton&lt;/type&gt;<br />
		&lt;class&gt;yourmodule/observer&lt;/class&gt;<br />
		&lt;method&gt;redirectNewsletterSuccess&lt;/method&gt;<br />
	    &lt;/newsletter_subscribe_observer&gt;<br />
	&lt;/observers&gt;<br />
    &lt;/controller_action_postdispatch_newsletter_subscriber_new&gt;<br />
    &lt;controller_action_postdispatch_newsletter_subscriber_confirm&gt;<br />
	&lt;observers&gt;<br />
	    &lt;newsletter_subscribe_observer&gt;<br />
		&lt;type&gt;singleton&lt;/type&gt;<br />
		&lt;class&gt;yourmodule/observer&lt;/class&gt;<br />
		&lt;method&gt;redirectNewsletterConfirm&lt;/method&gt;<br />
	    &lt;/newsletter_subscribe_observer&gt;<br />
	&lt;/observers&gt;<br />
    &lt;/controller_action_postdispatch_newsletter_subscriber_confirm&gt;<br />
&lt;/events&gt;<br />
&lt;/frontend&gt;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Shaun E</title>
		<link>http://webdevster.com/ecommerce/magento/to-redirect-a-newsletter-subscriber-to-a-landing-page-url/comment-page-1#comment-1446</link>
		<dc:creator>Shaun E</dc:creator>
		<pubDate>Mon, 06 Dec 2010 12:47:13 +0000</pubDate>
		<guid isPermaLink="false">http://webdevster.com/?p=819#comment-1446</guid>
		<description>Great post.  I'll add one more option, which is somewhat similar to Method 3 above.  You can redirect to a CMS page (or another page outside magento) by using Magento events.  There are two things you have to do.

First define the event in your module's config.xml file.  Something like this...


    
	
	    
		singleton
		yourmodule/observer
		redirectNewsletterSuccess
	    
	
    
    
	
	    
		singleton
		yourmodule/observer
		redirectNewsletterConfirm
	    
	
    



Then create a new class in app/code/local/Yournamespace/Yourmodule/Model/Observer.php...
class Yournamespace_Yourmodule_Model_Observer {

    public function redirectNewsletterSuccess ($observer){
        Mage::app()-&#62;getResponse()-&#62;setRedirect(Mage::getBaseUrl()."newsletter-thanks.html");
    }

    public function redirectNewsletterConfirm($observer) {
        Mage::app()-&#62;getResponse()-&#62;setRedirect(Mage::getBaseUrl()."newsletter-confirmed.html");
    }
}

(This assumes that you have two CMS pages with ids "newsletter-success.html" and "newsletter-confirmed.html")

The main advantage of this over Method 3 is that it doesn't require a controller override, and is potentially more safe for upgrades.  One downside is that you might not get the special error/success messages displayed on the cms, depending on your theme.</description>
		<content:encoded><![CDATA[<p>Great post.  I&#8217;ll add one more option, which is somewhat similar to Method 3 above.  You can redirect to a CMS page (or another page outside magento) by using Magento events.  There are two things you have to do.</p>
<p>First define the event in your module&#8217;s config.xml file.  Something like this&#8230;</p>
<p>		singleton<br />
		yourmodule/observer<br />
		redirectNewsletterSuccess</p>
<p>		singleton<br />
		yourmodule/observer<br />
		redirectNewsletterConfirm</p>
<p>Then create a new class in app/code/local/Yournamespace/Yourmodule/Model/Observer.php&#8230;<br />
class Yournamespace_Yourmodule_Model_Observer {</p>
<p>    public function redirectNewsletterSuccess ($observer){<br />
        Mage::app()-&gt;getResponse()-&gt;setRedirect(Mage::getBaseUrl().&#8221;newsletter-thanks.html&#8221;);<br />
    }</p>
<p>    public function redirectNewsletterConfirm($observer) {<br />
        Mage::app()-&gt;getResponse()-&gt;setRedirect(Mage::getBaseUrl().&#8221;newsletter-confirmed.html&#8221;);<br />
    }<br />
}</p>
<p>(This assumes that you have two CMS pages with ids &#8220;newsletter-success.html&#8221; and &#8220;newsletter-confirmed.html&#8221;)</p>
<p>The main advantage of this over Method 3 is that it doesn&#8217;t require a controller override, and is potentially more safe for upgrades.  One downside is that you might not get the special error/success messages displayed on the cms, depending on your theme.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: seo site</title>
		<link>http://webdevster.com/ecommerce/magento/to-redirect-a-newsletter-subscriber-to-a-landing-page-url/comment-page-1#comment-1307</link>
		<dc:creator>seo site</dc:creator>
		<pubDate>Sat, 27 Nov 2010 20:27:08 +0000</pubDate>
		<guid isPermaLink="false">http://webdevster.com/?p=819#comment-1307</guid>
		<description>thankyou for the read I loved it. 
I really like the layout of your site.
I have bookmarked. thanks</description>
		<content:encoded><![CDATA[<p>thankyou for the read I loved it.<br />
I really like the layout of your site.<br />
I have bookmarked. thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: LETA</title>
		<link>http://webdevster.com/ecommerce/magento/to-redirect-a-newsletter-subscriber-to-a-landing-page-url/comment-page-1#comment-963</link>
		<dc:creator>LETA</dc:creator>
		<pubDate>Wed, 03 Nov 2010 10:18:07 +0000</pubDate>
		<guid isPermaLink="false">http://webdevster.com/?p=819#comment-963</guid>
		<description>Custom Magento Themes Based on an Existing Design.If you already have a starting point for your Magento theme design and need it implemented or improved on then we're here for you.</description>
		<content:encoded><![CDATA[<p>Custom Magento Themes Based on an Existing Design.If you already have a starting point for your Magento theme design and need it implemented or improved on then we&#8217;re here for you.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nithin Chacko Ninan</title>
		<link>http://webdevster.com/ecommerce/magento/to-redirect-a-newsletter-subscriber-to-a-landing-page-url/comment-page-1#comment-941</link>
		<dc:creator>Nithin Chacko Ninan</dc:creator>
		<pubDate>Thu, 28 Oct 2010 05:34:55 +0000</pubDate>
		<guid isPermaLink="false">http://webdevster.com/?p=819#comment-941</guid>
		<description>Thanks a  lot, it works in magento enterprise 1.9.

$this-&#62;_redirectReferer(); 

to 

$this-&#62;_redirectUrl(Mage::getBaseUrl().'newsletter-policy-and-promotions');

also 

$this-&#62;_redirectUrl(Mage::getBaseUrl());

to 
$this-&#62;_redirectUrl(Mage::getBaseUrl().'newsletter-policy-and-promotions');</description>
		<content:encoded><![CDATA[<p>Thanks a  lot, it works in magento enterprise 1.9.</p>
<p>$this-&gt;_redirectReferer(); </p>
<p>to </p>
<p>$this-&gt;_redirectUrl(Mage::getBaseUrl().&#8217;newsletter-policy-and-promotions&#8217;);</p>
<p>also </p>
<p>$this-&gt;_redirectUrl(Mage::getBaseUrl());</p>
<p>to<br />
$this-&gt;_redirectUrl(Mage::getBaseUrl().&#8217;newsletter-policy-and-promotions&#8217;);</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nithin Chacko Ninan</title>
		<link>http://webdevster.com/ecommerce/magento/to-redirect-a-newsletter-subscriber-to-a-landing-page-url/comment-page-1#comment-940</link>
		<dc:creator>Nithin Chacko Ninan</dc:creator>
		<pubDate>Thu, 28 Oct 2010 05:33:58 +0000</pubDate>
		<guid isPermaLink="false">http://webdevster.com/?p=819#comment-940</guid>
		<description>Thanks a  lot, it works in magento enterprise 1.9.

$this-&#62;_redirectReferer(); 

to 

$this-&#62;_redirectUrl(Mage::getBaseUrl().'newsletter-policy-and-promotions');

also 

$this-&#62;_redirectUrl(Mage::getBaseUrl().'newsletter-policy-and-promotions');

$this-&#62;_redirectUrl(Mage::getBaseUrl());

to 
$this-&#62;_redirectUrl(Mage::getBaseUrl());</description>
		<content:encoded><![CDATA[<p>Thanks a  lot, it works in magento enterprise 1.9.</p>
<p>$this-&gt;_redirectReferer(); </p>
<p>to </p>
<p>$this-&gt;_redirectUrl(Mage::getBaseUrl().&#8217;newsletter-policy-and-promotions&#8217;);</p>
<p>also </p>
<p>$this-&gt;_redirectUrl(Mage::getBaseUrl().&#8217;newsletter-policy-and-promotions&#8217;);</p>
<p>$this-&gt;_redirectUrl(Mage::getBaseUrl());</p>
<p>to<br />
$this-&gt;_redirectUrl(Mage::getBaseUrl());</p>
]]></content:encoded>
	</item>
</channel>
</rss>

