Question

Is there any way to display an error message after actionProductUpdate hook is executed in a module?

Looking at the Prestashop code, the hook is triggered in AdminProductController, but the return value is not being processed. Also adding any message in passed Product object seems to be out of my requirement.

The purpose is to provide user with an error message in case of wrong input, database update error etc after clicking on Save button in back-office product edit page.

Was it helpful?

Solution

in belvg blog user Prestarocket post the the very helpful comment:

"Why not using hookActionProductSave ? With this hook, you can add errors to the controller ($this->context->controller->errors[])"

Regards

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top