Jump to content

Add to errors array in frontController


f8dev

Recommended Posts

Hi,

 

I have added my own errror message in front using cookies

 

$this->context->cookie->__set('redirect_errors', Tools::displayError('You must be registered and logged in as a trade customer.'));

 

but I would like to know instead of doing it this way I want to add this to the errors array. I have tried the following.

 

$this->context->errors[] = Tools::displayError('message goes here!');
 
Tools::redirect('index.php?controller=authentication?back=my-account');

 

 

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