feho1 Posted December 19, 2021 Share Posted December 19, 2021 Hi, everyone. I hope i can get help with problem I have. in hookActionObjectCustomerUpdateBefore I have something like this : public function hookActionObjectCustomerUpdateBefore($params) { throw new PrestaShopException('You can not do this',999999999999999999); /// NOT WORKING throw new Exception($this->displayError("You can not do this"), 110); // NOT WORKING } None of them works I tried with $message = "you cant do this" same, tried without code, added documentation @throws exception and everything but all I get is : An unexpected error occurred. [PrestaShop\PrestaShop\Core\Domain\Customer\Exception\CustomerException code 0] or An unexpected error occurred. [Exception code 110] Tried $this->context->controller->error[] did not work because it just goes and updates the info of customer. Can anyone please help? 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