Skip to content

Instantly share code, notes, and snippets.

@ScarletPonytail
Last active June 8, 2017 14:11
Show Gist options
  • Save ScarletPonytail/4b886f21f079589a61a6f70a8b69f96e to your computer and use it in GitHub Desktop.
Save ScarletPonytail/4b886f21f079589a61a6f70a8b69f96e to your computer and use it in GitHub Desktop.
Magento - Newsletter [Fix not working sign up form]
{{block type="newsletter/subscribe" template="newsletter/subscribe.phtml"}}
If you wish to redirect customers to specific page after newsletter subscription, here's how.
Copy
app\code\core\Mage\Newsletter\controllers\SubscriberController.php
to
app\code\local\Mage\Newsletter\controllers\SubscriberController.php
Open the created local file. Find in two places:
$this->_redirectReferer();
Change it to:
$this->_redirectUrl(Mage::getBaseUrl());
That will redirect user to the home page after newsletter subscription. If you wish to redirect to specific page, use this:
$this->_redirectUrl(Mage::getBaseUrl().'cms-page-identifier');
Thats it. Now you control the page the user is redirected after newsletter subscription in magento.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment