Matt Mikos Posted October 17, 2018 Share Posted October 17, 2018 This is my first post, so hello everyone! I'm just creating one of my first modules. I have a problem. I would like to somehow get what Prestashop returns after subscribing to the newsletter. Where to search for the script / code verifying the email address? Or can I call one of the methods? My module - in a short - adds modal after subscribing to the newsletter with some information. Thank you in advance for your help! Link to comment Share on other sites More sharing options...
Rolige Posted October 17, 2018 Share Posted October 17, 2018 Hello: In Prestashop 1.7 module for subscription is ps_emailsubscription. Unfortunable there is no hook or any other method that can alert you when a user successfully subscribed to newsletter. However, you can use the public methods of this module (isNewsletterRegistered) to check is an email address is already registered or check the registration method (newsletterRegistration) and after that execute your own behaviour. Note: Ajax calls are made to modules\ps_emailsubscription\controllers\front\subscription.php controller. Regards 1 Link to comment Share on other sites More sharing options...
Matt Mikos Posted October 17, 2018 Author Share Posted October 17, 2018 Thanks for the answer! That explains why I could not find it anywhere. Okay, so I can call the isNewsletterRegistered method with the email address from the $ _POST array. That should be enough for my module. Thank you and best regards! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now