Facebook fans

Latest from Twitter

Display a success message after subscribing newsletter successfully

Posted date: 8 Aug 2011 | Posted by: admin | 0 comments

I added the Method 1 to this article that is original from http://webdevster.com/ecommerce/magento/to-redirect-a-newsletter-subscriber-to-a-landing-page-url.

Magento does a good job with their newsletter infrastructure, but just like their web app, it does require you to fine tune it to your specifications. One such fine tuning is the way the newsletter handles it’s subscribers, once they subscribe. Ideally, when the customer subscribes you would want them to keep shopping and not to read a form about newsletter policy.

1. A pop up would do the trick, but what if they have pop ups from being displayed.
2. A simple note saying, Thank you for your subscription. For more info on our Newsletter Policy please click here. Magento already has this feature but without the link being dispalyed.
3. Or  to a CMS page which shows special discounted products viewed only by new subscribers. Here you can place your newsletter policy in short format, so it’s not obtrusive, but yet is available if the subscriber wants to read.

Either of these  require hacking in Magento Core files. I’ll show you 2 and 3.

Method 1:

Add to the top of the page you want to display the success message the following js script: <script type=“text/javascript”>

var message = '<?php echo strip_tags($this->getChildHtml('global_messages')) ?>';
if (message == $this->__('Thank you for your subscription')) alert("What ever you want to display!");

Method 2:

A simple note saying, Thank you for your subscription.

Log into Magento Admin>CMS>Manage Pages>Add New Page

Create a Newsletter Policy CMS page, i.e. newsletter-promotions

Open SubscriberController.php file located in:


$session->addSuccess($this->__('Thank you for your subscription'));


$session->addSuccess($this->__('Thank you for your subscription. For more info on our Newsletter Policy, please click <a href="newsletter-promotions" target="_self">here</a>.'));

It would be a good idea to also do the same for; Please enter a valid email address; Confirmation request has been sent; and There was a problem with the subscription, messages.

Method 3.

Redirect to a special page of discounted products vieable only by subscribers, which contains the newsletter policy.

Magento Admin>Catalog>Manage Products>Add New Product
Create new special discounted products, with Visibilty attribute set to, Nowhere. Make a note of the product ID.

Magento Admin>CMS>Manage Pages>Add New Page
Create a Newsletter Policy CMS page, i.e. newsletter-policy-and-promotions. In this page you can add your special products you created for your new subscribers. (This is not covered in the scope of this, How To)

Change at approx line 65:






Now the subscriber will automatically be redirected to your new page, and the, “Thank you for your subscription” message will still be displayed.

Hope this helps you.

It's useful? Like this article!

Comments are closed.

Share this

Related posts

Pinterest Fan Box – Add Pinterest Followers to your Magento site image

Pinterest Fan Box, do you know how to add your Pinterest...

7 Apr 2012
Pinterest Feeds – Add Pinterest Pin Board to Magento Site image

Pinterest Feeds to Magento sites, how to do the...

23 Mar 2012
Pinterest Magento Linker image

Pinterest is one of the hottest social networks and is...

14 Mar 2012
Debugging magento templates image

Developing in Magento without these debugging tips can be...

14 Oct 2011

Mirage Design @ 2011 | Web development, Website design, Magento development, Wordpress development

Pinterest Tutorial   Ty so bong da   Tim chung cu