This question refers to the file:
specifically line 70 (my line # might be off, but I think it’s 70):
Here’s what I’m trying to do:
1. Keep the Newsletter Subscription box as it is by default on my magento store (store.mydomain.com). When user enters an email address, the line above causes a page refresh - and the rest of the code in this file causes a “Thank you” message to be displayed at the top. This goal is already accomplished perfectly by the Magento code right out of the box.
2. I’d also like to add the following function: I’d like to use the code found in the template file (subscribe.phtml) to post a sign-up for newsletter box on one of the main pages of my domain (http://www.mydomain.com). A user can also sign up for the newsletter here, too. I COULD create a separate database, and then merge the two lists together later (i.e. people who sign up for newsletter via main site, and people who sign up for newsletter via magento store part of site), but that is obviously not ideal. Right now, if I don’t change the code in SubscriberController.php, the functionality WORKS, but the line above ($this->_redirectReferer();) causes the page not to refresh to the same page (i.e. the page on http://www.mydomain.com), but rather takes the user to the home page of store.mydomain.com.
So I need to edit the controller file so that if the user is on one of the magento pages, it keeps them right where they are and displays the thank you message, but if they’re on one of the mainsite pages, it displays the thank you page and keeps them there on the same page in the main site.
I can’t seem to figure this out with PHP. Can someone please help?