dp2021 Posted January 7, 2021 Share Posted January 7, 2021 Hi community, I hope you can help me with this issue: We have installed Prestashop versión 1.7.6.7 and we have developed a php script to update price and stock. Every time we try to execute $product->update() it stops with Fatal Error. It only Works if the site is under maintenance. By any chance, do you know what could be happening? Thank you in advance! Link to comment Share on other sites More sharing options...
tomerg3 Posted January 7, 2021 Share Posted January 7, 2021 Knowing the details of the Fatal Error is crucial to identifying the issue. If you didn't see details, try to enable debug mode in /config/defines.inc.php Link to comment Share on other sites More sharing options...
stefano.vita Posted March 24, 2022 Share Posted March 24, 2022 I know this is a very late reply, but the mai culprit for this error is that the context employee is null. Add: $employee = new Employee(); $this->context->employee = $employee; And the controller will update products. 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