Jump to content

How to get the result of Validation Newsletter subscription?


Recommended Posts

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

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

  • Like 1
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...