vinsbg Posted September 1, 2015 Share Posted September 1, 2015 Hi, I'm new here and new in prestashop. I've set my shop and everything is working except when I make some order and on last step where is "finish order" i got this error: 500 Server Error Oops, something went wrong. I put debug mode on to see what is the error but honestly I don't understand what is it. Here is the error: [PrestaShopException] Can't load Order status at line 178 in file classes/PaymentModule.php 173. 174. $order_status = new OrderState((int)$id_order_state, (int)$this->context->language->id); 175. if (!Validate::isLoadedObject($order_status)) 176. { 177. PrestaShopLogger::addLog('PaymentModule::validateOrder - Order Status cannot be loaded', 3, null, 'Cart', (int)$id_cart, true); 178. throw new PrestaShopException('Can\'t load Order status'); 179. } 180. 181. if (!$this->active) 182. { 183. PrestaShopLogger::addLog('PaymentModule::validateOrder - Module is not active', 3, null, 'Cart', (int)$id_cart, true); This line ( 178 ) is in red color - throw new PrestaShopException('Can\'t load Order status'); Can anyone help me with this one? Link to comment Share on other sites More sharing options...
NemoPS Posted September 2, 2015 Share Posted September 2, 2015 What is the payment module? It seems it's trying to set the order to an invalid status Link to comment Share on other sites More sharing options...
vinsbg Posted September 3, 2015 Author Share Posted September 3, 2015 It is custom payment module from one of the carriers in the country with delivery option and everything. I've contacted the company which is owner and they are checking now. Will post what happen as soon as I have answer. Link to comment Share on other sites More sharing options...
vekia Posted September 3, 2015 Share Posted September 3, 2015 check where the $id_order_state is defined and what number it contains then go to orders > statuses and verify if status with this id exists. Link to comment Share on other sites More sharing options...
NemoPS Posted September 4, 2015 Share Posted September 4, 2015 It is custom payment module from one of the carriers in the country with delivery option and everything. I've contacted the company which is owner and they are checking now. Will post what happen as soon as I have answer. It's likely using a non existing status then. You can check what the user above me said. Link to comment Share on other sites More sharing options...
vinsbg Posted September 4, 2015 Author Share Posted September 4, 2015 I have defined new status for orders. Then assign it to the payment method but the result is same. How can I do this: check where the $id_order_state is defined and what number it contains then go to orders > statuses and verify if status with this id exists. Link to comment Share on other sites More sharing options...
vinsbg Posted September 4, 2015 Author Share Posted September 4, 2015 It's crashing on the last step 'Validation' whit this error: PaymentModuleCore->validateOrder - [line 31 - modules/econtpayment/controllers/front/validation.php] - [9 Arguments] 26. 27. if (Tools::getValue('confirm')) 28. { 29. $customer = new Customer((int)$this->context->cart->id_customer); 30. $total = $this->context->cart->getOrderTotal(true, Cart::BOTH); 31. $this->module->validateOrder((int)$this->context->cart->id, Configuration::get('PS_OS_PREPARATION'), $total, $this->module->displayName, null, array(), null, false, $customer->secure_key); 32. Tools::redirectLink(__PS_BASE_URI__.'order-confirmation.php?key='.$customer->secure_key.'&id_cart='.(int)$this->context->cart->id.'&id_module='.(int)$this->module->id.'&id_order='.(int)$this->module->currentOrder); 33. } 34. } 35. 36. /** Link to comment Share on other sites More sharing options...
NemoPS Posted September 5, 2015 Share Posted September 5, 2015 Check the db for PS_OS_PREPARATION ps_configuration table Link to comment Share on other sites More sharing options...
vinsbg Posted September 7, 2015 Author Share Posted September 7, 2015 id_configuration: 121 id_shop_group: NULL id_shop: NULL name: PS_OS_PREPARATION value: 3 date_add: 0000-00-00 00:00:00 date_upd: 0000-00-00 00:00:00 That's what I have in database table ps_configuration for PS_OS_PREPARATION Link to comment Share on other sites More sharing options...
NemoPS Posted September 7, 2015 Share Posted September 7, 2015 Is the status with id = 3 available on the store? If so, try setting shop and shop_group to 1 1 Link to comment Share on other sites More sharing options...
vinsbg Posted September 7, 2015 Author Share Posted September 7, 2015 So I really don't have status with id = 3. I have with 1 and 2. So I changed the value = 2 and now is working. Just one question: How value 3 is set there when I don't have status with ID = 3 in back office? Link to comment Share on other sites More sharing options...
NemoPS Posted September 9, 2015 Share Posted September 9, 2015 I think it's set when you install presta, and you are not supposed to erase the status 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