Uff182 Posted March 15, 2018 Share Posted March 15, 2018 (edited) Hello, I'm developing a module that adds a custom tab to the product sheet. The module performs some DB operations at product add/update; in PS 1.6 I could report any error using code like $this->context->controller->errors[] = 'my message' In 1.7 this does not work. Having a look on the forum I found a solution which is not what I'm looking for, which consists in adding header("HTTP/1.0 400 Bad Request"); die(json_encode(array( 'error' => array($this->l(' Error') )))); This code leads to a red pop-up appearing with the message that it was not possible to update the product. I would like instead to separate PS message from my module's, showing (for example) "Product was successfully updated" standard PS notification and my "Error: module error" custom notification. Is there any way to perform this operation? Edited March 16, 2018 by Uff182 (see edit history) Link to comment Share on other sites More sharing options...
Uff182 Posted April 5, 2018 Author Share Posted April 5, 2018 Anyone? 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