catzarov Posted November 5, 2015 Share Posted November 5, 2015 Hi all, i have big problem with my upgradet eshop. I'm using 1.6.1.2 When i want to change order status i see this message: [PrestaShopException]Property StockAvailable->id_product is emptyat line 909 in file classes/ObjectModel.php } $message = $this->validateField($field, $this->$field); if ($message !== true) { if ($die) { throw new PrestaShopException($message); } return $error_return ? $message : false; } } ObjectModelCore->validateFields - [line 246 - classes/ObjectModel.php] ObjectModelCore->getFields - [line 652 - classes/ObjectModel.php] ObjectModelCore->update - [line 406 - classes/stock/StockAvailable.php] - [1 Arguments] StockAvailableCore->update - [line 127 - Core/Business/Stock/Core_Business_Stock_StockManager.php] Core_Business_Stock_StockManager->updateQuantity - [line 472 - classes/stock/StockAvailable.php] - [4 Arguments] StockAvailableCore::updateQuantity - [line 206 - classes/order/OrderHistory.php] - [4 Arguments] OrderHistoryCore->changeIdOrderState - [line 531 - controllers/admin/AdminOrdersController.php] - [3 Arguments] AdminOrdersControllerCore->postProcess - [line 178 - classes/controller/Controller.php] ControllerCore->run - [line 367 - classes/Dispatcher.php] DispatcherCore->dispatch - [line 58 - admin/index.php] PLEASE ALL, GIVE ME HELP, HOW TO FIX THIS PROBLEM. Link to comment Share on other sites More sharing options...
Daenu Posted August 23, 2016 Share Posted August 23, 2016 (edited) Hi catzarov Did you find a solution to this problem? I have exactly the same issue Edited August 23, 2016 by Daenu (see edit history) Link to comment Share on other sites More sharing options...
catzarov Posted September 1, 2016 Author Share Posted September 1, 2016 It is a bug in file Core/Business/Stock/Core_Business_Stock_StockManager.php at line 126 you should have like this: $stockAvailable->quantity = $stockAvailable->quantity + $delta_quantity; $stockAvailable->id_product = (int)$product->id; $stockAvailable->id_product_attribute = (int)$id_product_attribute; $stockAvailable->update(); 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