PrestashopEnthu Posted November 15, 2017 Share Posted November 15, 2017 I am creating a module with the a form on .tpl. I have created a function as follow to update the status but I am receiving an error: Property OrderHistory->id_order_state is empty at line 909 in file classes/ObjectModel.php public function postProcess() { global $cookie; if (Tools::isSubmit('submitpaymentvalidated')) { $ids= Tools::getValue('paymentvalidated'); foreach ($ids as $updateids) { $objOrder = new Order($updateids); $history = new OrderHistory(); $history->id_order = (int)$objOrder->id; $history->id_employee = $cookie->id_employee; $history->changeIdOrderState(3, (int)($objOrder->id)); $history->add(true); $history->save(); } } } I am baffled as to why the error occured when I am using changeIdOrderState. Any guidance is truly appreciated. Thank you. Link to comment Share on other sites More sharing options...
PrestashopEnthu Posted November 15, 2017 Author Share Posted November 15, 2017 Solved. I did not pass the value in. Upon further check, this has been solved. 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