Jump to content

How to display custom notifications after user sign up


xop32

Recommended Posts

I wish to display a simple user success notifacation  when a user creates a account on my prestashop store

 

i want to display a  success message like:

$this->displayConfirmation('Thank you for creating a account.');

or adding into the prestashop notifcations  system some how

 

where would be the correct place to insert this nofication message?

at the moment when a user signs up for a account, the account is created and they are redirected back to the homepage, all i want then is my message to pop up in the nofications template file block as a success, so the user nos that the account has been created ok.

 

i am not sure where i should add in the bit of code to enable this , can someone please help me or advise, thanks

Link to comment
Share on other sites

i have added in a line of code in the AuthController.php file

 

if ($hookResult && $register_form->submit()) {
                    $should_redirect = true;
                    
                    // added this in to nofify a user when they have created a account
                    $this->success[] = $this->trans('You have created a account successfully! Goto My Account to offer Coaching Services', array(), 'Shop.Notifications.Success');
                    
                }

 

not sure if this is the best solution, but it seems to work

another question is how do i add a link into the nofication text?? if i add a <a href"">link</a> into the nofication text it shows as plain text code instead of html, is there a special variable i need to use to show a link in this location

 

$this->success[] = $this->trans('You have created a account successfully! <a href="my-account">Goto My Account to offer Coaching Services</a>', array(), 'Shop.Notifications.Success');

in the above the link will not be displayed in the nofication text in prestashop

 

 

  • Thanks 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...