Search code examples
prestashope-commerce

prestashop - Can't load Order status at line 242 in file classes/PaymentModule.php


when I order with an obligation to pay

[PrestaShopException] Can't load Order status at line 242 in file classes/PaymentModule.php

237.         }
238. 
239.         $order_status = new OrderState((int) $id_order_state, (int) $this->context->language->id);
240.         if (!Validate::isLoadedObject($order_status)) {
241.             PrestaShopLogger::addLog('PaymentModule::validateOrder - Order Status cannot be loaded', 3, null, 'Cart', (int) $id_cart, true);
242.             throw new PrestaShopException('Can\'t load Order status');
243.         }
244. 
245.         if (!$this->active) {
246.             PrestaShopLogger::addLog('PaymentModule::validateOrder - Module is not active', 3, null, 'Cart', (int) $id_cart, true);
247.             die(Tools::displayError());
PaymentModuleCore->validateOrder - [line 58 - modules/ps_wirepayment/controllers/front/validation.php] - [9 Arguments]
Ps_WirepaymentValidationModuleFrontController->postProcess - [line 270 - classes/controller/Controller.php]
ControllerCore->run - [line 509 - classes/Dispatcher.php]
DispatcherCore->dispatch - [line 24 - override/classes/Dispatcher.php]
Dispatcher->dispatch - [line 28 - index.php]

Solution

  • insert with phpmyadmin the table

    ps_order_state:

      INSERT INTO `ps_order_state` (`id_order_state`, `invoice`, `send_email`, `module_name`, `color`, `unremovable`, `hidden`, `logable`, `delivery`, `shipped`, `paid`, `deleted`) VALUES
    (1, 0, 1, 'cheque', 'RoyalBlue', 1, 0, 0, 0, 0, 0, 0),
    (2, 1, 1, '', 'LimeGreen', 1, 0, 1, 0, 0, 1, 0),
    (3, 1, 1, '', 'DarkOrange', 1, 0, 1, 0, 0, 1, 0),
    (4, 1, 1, '', 'BlueViolet', 1, 0, 1, 1, 1, 1, 0),
    (5, 1, 0, '', '#108510', 1, 0, 1, 1, 1, 1, 0),
    (6, 0, 1, '', 'Crimson', 1, 0, 0, 0, 0, 0, 0),
    (7, 1, 1, '', '#ec2e15', 1, 0, 0, 0, 0, 0, 0),
    (8, 0, 1, '', '#8f0621', 1, 0, 0, 0, 0, 0, 0),
    (9, 1, 1, '', 'HotPink', 1, 0, 0, 0, 0, 1, 0),
    (10, 0, 1, 'bankwire', 'RoyalBlue', 1, 0, 0, 0, 0, 0, 0),
    (11, 0, 0, '', 'RoyalBlue', 1, 0, 0, 0, 0, 0, 0),
    (12, 1, 1, '', 'LimeGreen', 1, 0, 1, 0, 0, 1, 0),
    (13, 1, 0, '', '#DDEEFF', 0, 0, 1, 0, 0, 0, 0);