Skip to content Skip to sidebar Skip to footer

Magento Newsletter Succeess Message In Pop Up

I want to create fine pop up window for success message after submitting newsletter form . How I can do this with jquery js ? if I thinking right at first I need to check messages

Solution 1:

I have found three Method and I have applied it into my Magento:

Method 1: Add to the top of the page you want to display the success message the following js script:

<scripttype=“text/javascript”>var message = '<?phpecho 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:

MagentoStore\App\Code\Core\Mage\Newsletter\controllers\

Change

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

to

$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>AddNew Product

Create new special discounted products, with Visibilty attribute set to, Nowhere. Make a note of the product ID.

Magento Admin>CMS>Manage Pages>AddNew 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:

$this->_redirectReferer();

to

$this->_redirectUrl(Mage::getBaseUrl().'newsletter-policy-and-promotions');
$this->_redirectUrl(Mage::getBaseUrl());

to

$this->_redirectUrl(Mage::getBaseUrl().'newsletter-policy-and-promotions');

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.

Post a Comment for "Magento Newsletter Succeess Message In Pop Up"