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.

有帮助吗?

解决方案

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

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top