I want to change the success message content after the newsletter subscription.Can anyone tell me where the success message template resides in magento?
2 Answers
I don't know which Magento version you are talking about so I try to make a generic answer.
Success messages are in the controller file using session messages to display them.
In your case this is in Mage_Newsletter_SubscriberController
with this code :
$session->addSuccess($this->__('Thank you for your subscription.'));
Here you have three solutions:
1_ Override controller
You can override the controller and change the message in your rewrite
Help : http://inchoo.net/magento/overriding-magento-blocks-models-helpers-and-controllers/
Possible issue : for code evolution rewrites are not the best solution.
2_ Use observer
You can use observer as controller_action_post_dispatch_*
to add your own message to session and manage them
3_ Change traduction
You change change the traduction in files app/locale/{locale_code}/{module}.csv
Possible issue : misleading when searching this traduction in future or for other people working on your website
In your case I suggest you the rewrite because newsletter is not a "sensible" part of Magento. (Note : Take care if you install a module that is using this feature.)
I found a way. In the magento root folder/app/locale/en_us/Mage_Newsletter, We can edit the success message there and save the file.