Jump to content

[SOLVED] Can't load Order state status at line 146 in file classes/PaymentModule.php


Recommended Posts

Hi All,

 

I can place an order but when I try to confirm I get this error:

 

 

[PrestaShopException]

 

Can't load Order state status

at line 146 in file classes/PaymentModule.php

 

140. if (Configuration::get('PS_TAX_ADDRESS_TYPE') == 'id_address_delivery')

141. $context_country = $this->context->country;

142.

143. $order_status = new OrderState((int)$id_order_state, (int)$this->context->language->id);

144. if (!Validate::isLoadedObject($order_status))

145. throw new PrestaShopException('Can\'t load Order state status');

146.

147. if (!$this->active)

148. die(Tools::displayError());

149. // Does order already exists ?

150. if (Validate::isLoadedObject($this->context->cart) && $this->context->cart->OrderExists() == false)

  • PaymentModuleCore->validateOrder - [line 65 - modules/bankwire/controllers/front/validation.php] - [9 Arguments]
     
    59. '{bankwire_owner}' => Configuration::get('BANK_WIRE_OWNER'),
    60. '{bankwire_details}' => nl2br(Configuration::get('BANK_WIRE_DETAILS')),
    61. '{bankwire_address}' => nl2br(Configuration::get('BANK_WIRE_ADDRESS'))
    62. );
    63.
    64. $this->module->validateOrder($cart->id, Configuration::get('PS_OS_BANKWIRE'), $total, $this->module->displayName, NULL, $mailVars, (int)$currency->id, false, $customer->secure_key);
    65. Tools::redirect('index.php?controller=order-confirmation&id_cart='.$cart->id.'&id_module='.$this->module->id.'&id_order='.$this->module->currentOrder.'&key='.$customer->secure_key);
    66. }
    67. }
     
     
    Argument [0]
    15
    Argument [1]
    10
    Argument [2]
    228.31
    Argument [3]
    Bank Wire
    Argument [4]
     
    Argument [5]
    Array
    (
    [{bankwire_owner}] =>
    [{bankwire_details}] =>
    [{bankwire_address}] =>
    )
     
    Argument [6]
    2
    Argument [7]
     
    Argument [8]
    7c661221684c9e0049ae72fce7dc4e98
  • BankwireValidationModuleFrontController->postProcess - [line 159 - classes/controller/Controller.php] - [0 Argument]
     
    153. // setMedia MUST be called before postProcess
    154. if (!$this->content_only && ($this->display_header || (isset($this->className) && $this->className)))
    155. $this->setMedia();
    156.
    157. // postProcess handles ajaxProcess
    158. $this->postProcess();
    159.
    160. if (!empty($this->redirect_after))
    161. $this->redirect();
    162.
    163. if (!$this->content_only && ($this->display_header || (isset($this->className) && $this->className)))
  • ControllerCore->run - [line 349 - classes/Dispatcher.php] - [0 Argument]
     
    343. // Execute hook dispatcher
    344. if (isset($params_hook_action_dispatcher))
    345. Hook::exec('actionDispatcher', $params_hook_action_dispatcher);
    346.
    347. // Running controller
    348. $controller->run();
    349. }
    350. catch (PrestaShopException $e)
    351. {
    352. $e->displayMessage();
    353. }
  • DispatcherCore->dispatch - [line 29 - index.php] - [0 Argument]

 

Has anyone got any Idea as to what is going on. Complete newby here

Edited by waynemiller (see edit history)
Link to comment
Share on other sites

  • 1 year later...
  • 1 month later...

I have the same problem and my tables ps_order_state and ps_order_state_lang was empty.

So insert with phpmyadmin the 2 tables 

ps_ is my prefix ! change it if your prefix db is not the same !

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);

ps_order_state_lang:

INSERT INTO `ps_order_state_lang` (`id_order_state`, `id_lang`, `name`, `template`) VALUES
(1, 1, 'Awaiting cheque payment', 'cheque'),
(1, 2, 'Awaiting cheque payment', 'cheque'),
(1, 3, 'Scheckzahlung wird erwartet', 'cheque'),
(1, 4, 'En espera de pago por cheque', 'cheque'),
(1, 5, 'En attente du paiement par chèque', 'cheque'),
(1, 6, 'In attesa di pagamento con assegno', 'cheque'),
(2, 1, 'Payment accepted', 'payment'),
(2, 2, 'Payment accepted', 'payment'),
(2, 3, 'Zahlung eingegangen', 'payment'),
(2, 4, 'Pago aceptamos', 'payment'),
(2, 5, 'Paiement accepté', 'payment'),
(2, 6, 'Pagamento accettato', 'payment'),
(3, 1, 'Preparation in progress', 'preparation'),
(3, 2, 'Preparation in progress', 'preparation'),
(3, 3, 'Bestellung eingegangen', 'preparation'),
(3, 4, 'Preparación en curso', 'preparation'),
(3, 5, 'Préparation en cours', 'preparation'),
(3, 6, 'Preparazione in corso', 'preparation'),
(4, 1, 'Shipped', 'shipped'),
(4, 2, 'Shipped', 'shipped'),
(4, 3, 'Versendet', 'shipped'),
(4, 4, 'Enviado', 'shipped'),
(4, 5, 'En cours de livraison', 'shipped'),
(4, 6, 'Consegna in corso', 'shipped'),
(5, 1, 'Delivered', ''),
(5, 2, 'Delivered', ''),
(5, 3, 'Erfolgreich abgeschlossen', ''),
(5, 4, 'Entregado', ''),
(5, 5, 'Livré', ''),
(5, 6, 'Consegnato', ''),
(6, 1, 'Canceled', 'order_canceled'),
(6, 2, 'Canceled', 'order_canceled'),
(6, 3, 'Storniert', 'order_canceled'),
(6, 4, 'Cancelada', 'order_canceled'),
(6, 5, 'Annulé', 'order_canceled'),
(6, 6, 'Annullato', 'order_canceled'),
(7, 1, 'Refund', 'refund'),
(7, 2, 'Refund', 'refund'),
(7, 3, 'Erstattet', 'refund'),
(7, 4, 'Reembolsado', 'refund'),
(7, 5, 'Remboursé', 'refund'),
(7, 6, 'Rimborsato', 'refund'),
(8, 1, 'Payment error', 'payment_error'),
(8, 2, 'Payment error', 'payment_error'),
(8, 3, 'Fehler bei der Bezahlung', 'payment_error'),
(8, 4, 'Error de pago', 'payment_error'),
(8, 5, 'Erreur de paiement', 'payment_error'),
(8, 6, 'Errore di pagamento', 'payment_error'),
(9, 1, 'On backorder', 'outofstock'),
(9, 2, 'On backorder', 'outofstock'),
(9, 3, 'Artikel erwartet', 'outofstock'),
(9, 4, 'Productos fuera de línea', 'outofstock'),
(9, 5, 'En attente de réapprovisionnement', 'outofstock'),
(9, 6, 'In attesa di rifornimento', 'outofstock'),
(10, 1, 'Awaiting bank wire payment', 'bankwire'),
(10, 2, 'Awaiting bank wire payment', 'bankwire'),
(10, 3, 'Warten auf Zahlungseingang', 'bankwire'),
(10, 4, 'En espera de pago por transferencia bancaria', 'bankwire'),
(10, 5, 'En attente du paiement par virement bancaire', 'bankwire'),
(10, 6, 'In attesa di pagamento con bonifico bancario', 'bankwire'),
(11, 1, 'Awaiting PayPal payment', ''),
(11, 2, 'Awaiting PayPal payment', ''),
(11, 3, 'Warten auf Zahlungseingang von PayPal', ''),
(11, 4, 'En espera de pago por PayPal', ''),
(11, 5, 'En attente du paiement par PayPal', ''),
(11, 6, 'In attesa di pagamento con PayPal', ''),
(12, 1, 'Payment remotely accepted', 'payment'),
(12, 2, 'Payment remotely accepted', 'payment'),
(12, 3, 'Payment Anmeldung erfolgreich', 'payment'),
(12, 4, 'Payment remotely accepted', 'payment'),
(12, 5, 'Paiement à distance accepté', 'payment'),
(12, 6, 'Payment remotely accepted', 'payment'),
(13, 1, 'Autorisation acceptée par PayPal', ''),
(13, 2, 'Autorisation acceptée par PayPal', ''),
(13, 3, 'Autorisation acceptée par PayPal', ''),
(13, 4, 'Autorisation acceptée par PayPal', ''),
(13, 5, 'Autorisation acceptée par PayPal', ''),
(13, 6, 'Autorisation acceptée par PayPal', '')

Now it works :) 

PS: Sorry for my bad english i'm french :)

  • Like 4
Link to comment
Share on other sites

  • 2 months later...

I have the same problem and my tables ps_order_state and ps_order_state_lang was empty.

So insert with phpmyadmin the 2 tables 

ps_ is my prefix ! change it if your prefix db is not the same !

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);

ps_order_state_lang:

INSERT INTO `ps_order_state_lang` (`id_order_state`, `id_lang`, `name`, `template`) VALUES
(1, 1, 'Awaiting cheque payment', 'cheque'),
(1, 2, 'Awaiting cheque payment', 'cheque'),
(1, 3, 'Scheckzahlung wird erwartet', 'cheque'),
(1, 4, 'En espera de pago por cheque', 'cheque'),
(1, 5, 'En attente du paiement par chèque', 'cheque'),
(1, 6, 'In attesa di pagamento con assegno', 'cheque'),
(2, 1, 'Payment accepted', 'payment'),
(2, 2, 'Payment accepted', 'payment'),
(2, 3, 'Zahlung eingegangen', 'payment'),
(2, 4, 'Pago aceptamos', 'payment'),
(2, 5, 'Paiement accepté', 'payment'),
(2, 6, 'Pagamento accettato', 'payment'),
(3, 1, 'Preparation in progress', 'preparation'),
(3, 2, 'Preparation in progress', 'preparation'),
(3, 3, 'Bestellung eingegangen', 'preparation'),
(3, 4, 'Preparación en curso', 'preparation'),
(3, 5, 'Préparation en cours', 'preparation'),
(3, 6, 'Preparazione in corso', 'preparation'),
(4, 1, 'Shipped', 'shipped'),
(4, 2, 'Shipped', 'shipped'),
(4, 3, 'Versendet', 'shipped'),
(4, 4, 'Enviado', 'shipped'),
(4, 5, 'En cours de livraison', 'shipped'),
(4, 6, 'Consegna in corso', 'shipped'),
(5, 1, 'Delivered', ''),
(5, 2, 'Delivered', ''),
(5, 3, 'Erfolgreich abgeschlossen', ''),
(5, 4, 'Entregado', ''),
(5, 5, 'Livré', ''),
(5, 6, 'Consegnato', ''),
(6, 1, 'Canceled', 'order_canceled'),
(6, 2, 'Canceled', 'order_canceled'),
(6, 3, 'Storniert', 'order_canceled'),
(6, 4, 'Cancelada', 'order_canceled'),
(6, 5, 'Annulé', 'order_canceled'),
(6, 6, 'Annullato', 'order_canceled'),
(7, 1, 'Refund', 'refund'),
(7, 2, 'Refund', 'refund'),
(7, 3, 'Erstattet', 'refund'),
(7, 4, 'Reembolsado', 'refund'),
(7, 5, 'Remboursé', 'refund'),
(7, 6, 'Rimborsato', 'refund'),
(8, 1, 'Payment error', 'payment_error'),
(8, 2, 'Payment error', 'payment_error'),
(8, 3, 'Fehler bei der Bezahlung', 'payment_error'),
(8, 4, 'Error de pago', 'payment_error'),
(8, 5, 'Erreur de paiement', 'payment_error'),
(8, 6, 'Errore di pagamento', 'payment_error'),
(9, 1, 'On backorder', 'outofstock'),
(9, 2, 'On backorder', 'outofstock'),
(9, 3, 'Artikel erwartet', 'outofstock'),
(9, 4, 'Productos fuera de línea', 'outofstock'),
(9, 5, 'En attente de réapprovisionnement', 'outofstock'),
(9, 6, 'In attesa di rifornimento', 'outofstock'),
(10, 1, 'Awaiting bank wire payment', 'bankwire'),
(10, 2, 'Awaiting bank wire payment', 'bankwire'),
(10, 3, 'Warten auf Zahlungseingang', 'bankwire'),
(10, 4, 'En espera de pago por transferencia bancaria', 'bankwire'),
(10, 5, 'En attente du paiement par virement bancaire', 'bankwire'),
(10, 6, 'In attesa di pagamento con bonifico bancario', 'bankwire'),
(11, 1, 'Awaiting PayPal payment', ''),
(11, 2, 'Awaiting PayPal payment', ''),
(11, 3, 'Warten auf Zahlungseingang von PayPal', ''),
(11, 4, 'En espera de pago por PayPal', ''),
(11, 5, 'En attente du paiement par PayPal', ''),
(11, 6, 'In attesa di pagamento con PayPal', ''),
(12, 1, 'Payment remotely accepted', 'payment'),
(12, 2, 'Payment remotely accepted', 'payment'),
(12, 3, 'Payment Anmeldung erfolgreich', 'payment'),
(12, 4, 'Payment remotely accepted', 'payment'),
(12, 5, 'Paiement à distance accepté', 'payment'),
(12, 6, 'Payment remotely accepted', 'payment'),
(13, 1, 'Autorisation acceptée par PayPal', ''),
(13, 2, 'Autorisation acceptée par PayPal', ''),
(13, 3, 'Autorisation acceptée par PayPal', ''),
(13, 4, 'Autorisation acceptée par PayPal', ''),
(13, 5, 'Autorisation acceptée par PayPal', ''),
(13, 6, 'Autorisation acceptée par PayPal', '')

Now it works :)

PS: Sorry for my bad english i'm french :)

i had the same problem but my 2 tables are not empty so what shall i do please ! any help :(

Link to comment
Share on other sites

the message is : 

[PrestaShopException]

Can't load Order state status
at line 147 in file classes/PaymentModule.php

141.         if (Configuration::get('PS_TAX_ADDRESS_TYPE') == 'id_address_delivery')
142.             $context_country = $this->context->country;
143.
144.         $order_status = new OrderState((int)$id_order_state, (int)$this->context->language->id);
145.         if (!Validate::isLoadedObject($order_status))
146.             throw new PrestaShopException('Can\'t load Order state status');
147.
148.         if (!$this->active)
149.             die(Tools::displayError());
150.         // Does order already exists ?
151.         if (Validate::isLoadedObject($this->context->cart) && $this->context->cart->OrderExists() == false)
Link to comment
Share on other sites

yes i did and it still dont work :(

and all the others modules of payement works normal !

did you want that i send to you my module in e-mail then you test on your site please :(

let me know if u accept :)

thank you

Link to comment
Share on other sites

  • 1 month later...

I have the same problem and my tables ps_order_state and ps_order_state_lang was empty.

So insert with phpmyadmin the 2 tables 

ps_ is my prefix ! change it if your prefix db is not the same !

ps_order_state:

 

Thank you so much, you saved my day!

Link to comment
Share on other sites

  • 3 weeks later...

I have the same problem and my tables ps_order_state and ps_order_state_lang was empty.

So insert with phpmyadmin the 2 tables 

ps_ is my prefix ! change it if your prefix db is not the same !

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);

ps_order_state_lang:

INSERT INTO `ps_order_state_lang` (`id_order_state`, `id_lang`, `name`, `template`) VALUES
(1, 1, 'Awaiting cheque payment', 'cheque'),
(1, 2, 'Awaiting cheque payment', 'cheque'),
(1, 3, 'Scheckzahlung wird erwartet', 'cheque'),
(1, 4, 'En espera de pago por cheque', 'cheque'),
(1, 5, 'En attente du paiement par chèque', 'cheque'),
(1, 6, 'In attesa di pagamento con assegno', 'cheque'),
(2, 1, 'Payment accepted', 'payment'),
(2, 2, 'Payment accepted', 'payment'),
(2, 3, 'Zahlung eingegangen', 'payment'),
(2, 4, 'Pago aceptamos', 'payment'),
(2, 5, 'Paiement accepté', 'payment'),
(2, 6, 'Pagamento accettato', 'payment'),
(3, 1, 'Preparation in progress', 'preparation'),
(3, 2, 'Preparation in progress', 'preparation'),
(3, 3, 'Bestellung eingegangen', 'preparation'),
(3, 4, 'Preparación en curso', 'preparation'),
(3, 5, 'Préparation en cours', 'preparation'),
(3, 6, 'Preparazione in corso', 'preparation'),
(4, 1, 'Shipped', 'shipped'),
(4, 2, 'Shipped', 'shipped'),
(4, 3, 'Versendet', 'shipped'),
(4, 4, 'Enviado', 'shipped'),
(4, 5, 'En cours de livraison', 'shipped'),
(4, 6, 'Consegna in corso', 'shipped'),
(5, 1, 'Delivered', ''),
(5, 2, 'Delivered', ''),
(5, 3, 'Erfolgreich abgeschlossen', ''),
(5, 4, 'Entregado', ''),
(5, 5, 'Livré', ''),
(5, 6, 'Consegnato', ''),
(6, 1, 'Canceled', 'order_canceled'),
(6, 2, 'Canceled', 'order_canceled'),
(6, 3, 'Storniert', 'order_canceled'),
(6, 4, 'Cancelada', 'order_canceled'),
(6, 5, 'Annulé', 'order_canceled'),
(6, 6, 'Annullato', 'order_canceled'),
(7, 1, 'Refund', 'refund'),
(7, 2, 'Refund', 'refund'),
(7, 3, 'Erstattet', 'refund'),
(7, 4, 'Reembolsado', 'refund'),
(7, 5, 'Remboursé', 'refund'),
(7, 6, 'Rimborsato', 'refund'),
(8, 1, 'Payment error', 'payment_error'),
(8, 2, 'Payment error', 'payment_error'),
(8, 3, 'Fehler bei der Bezahlung', 'payment_error'),
(8, 4, 'Error de pago', 'payment_error'),
(8, 5, 'Erreur de paiement', 'payment_error'),
(8, 6, 'Errore di pagamento', 'payment_error'),
(9, 1, 'On backorder', 'outofstock'),
(9, 2, 'On backorder', 'outofstock'),
(9, 3, 'Artikel erwartet', 'outofstock'),
(9, 4, 'Productos fuera de línea', 'outofstock'),
(9, 5, 'En attente de réapprovisionnement', 'outofstock'),
(9, 6, 'In attesa di rifornimento', 'outofstock'),
(10, 1, 'Awaiting bank wire payment', 'bankwire'),
(10, 2, 'Awaiting bank wire payment', 'bankwire'),
(10, 3, 'Warten auf Zahlungseingang', 'bankwire'),
(10, 4, 'En espera de pago por transferencia bancaria', 'bankwire'),
(10, 5, 'En attente du paiement par virement bancaire', 'bankwire'),
(10, 6, 'In attesa di pagamento con bonifico bancario', 'bankwire'),
(11, 1, 'Awaiting PayPal payment', ''),
(11, 2, 'Awaiting PayPal payment', ''),
(11, 3, 'Warten auf Zahlungseingang von PayPal', ''),
(11, 4, 'En espera de pago por PayPal', ''),
(11, 5, 'En attente du paiement par PayPal', ''),
(11, 6, 'In attesa di pagamento con PayPal', ''),
(12, 1, 'Payment remotely accepted', 'payment'),
(12, 2, 'Payment remotely accepted', 'payment'),
(12, 3, 'Payment Anmeldung erfolgreich', 'payment'),
(12, 4, 'Payment remotely accepted', 'payment'),
(12, 5, 'Paiement à distance accepté', 'payment'),
(12, 6, 'Payment remotely accepted', 'payment'),
(13, 1, 'Autorisation acceptée par PayPal', ''),
(13, 2, 'Autorisation acceptée par PayPal', ''),
(13, 3, 'Autorisation acceptée par PayPal', ''),
(13, 4, 'Autorisation acceptée par PayPal', ''),
(13, 5, 'Autorisation acceptée par PayPal', ''),
(13, 6, 'Autorisation acceptée par PayPal', '')

Now it works :)

PS: Sorry for my bad english i'm french :)

I have the same problem. Could you tell me how to insert these values in these 2 empty tables?

Many thanks

 

P.S. I am working on Prestashop 1.6

Link to comment
Share on other sites

I have the same problem and my tables ps_order_state and ps_order_state_lang was empty.

So insert with phpmyadmin the 2 tables 

ps_ is my prefix ! change it if your prefix db is not the same !

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);

ps_order_state_lang:

INSERT INTO `ps_order_state_lang` (`id_order_state`, `id_lang`, `name`, `template`) VALUES
(1, 1, 'Awaiting cheque payment', 'cheque'),
(1, 2, 'Awaiting cheque payment', 'cheque'),
(1, 3, 'Scheckzahlung wird erwartet', 'cheque'),
(1, 4, 'En espera de pago por cheque', 'cheque'),
(1, 5, 'En attente du paiement par chèque', 'cheque'),
(1, 6, 'In attesa di pagamento con assegno', 'cheque'),
(2, 1, 'Payment accepted', 'payment'),
(2, 2, 'Payment accepted', 'payment'),
(2, 3, 'Zahlung eingegangen', 'payment'),
(2, 4, 'Pago aceptamos', 'payment'),
(2, 5, 'Paiement accepté', 'payment'),
(2, 6, 'Pagamento accettato', 'payment'),
(3, 1, 'Preparation in progress', 'preparation'),
(3, 2, 'Preparation in progress', 'preparation'),
(3, 3, 'Bestellung eingegangen', 'preparation'),
(3, 4, 'Preparación en curso', 'preparation'),
(3, 5, 'Préparation en cours', 'preparation'),
(3, 6, 'Preparazione in corso', 'preparation'),
(4, 1, 'Shipped', 'shipped'),
(4, 2, 'Shipped', 'shipped'),
(4, 3, 'Versendet', 'shipped'),
(4, 4, 'Enviado', 'shipped'),
(4, 5, 'En cours de livraison', 'shipped'),
(4, 6, 'Consegna in corso', 'shipped'),
(5, 1, 'Delivered', ''),
(5, 2, 'Delivered', ''),
(5, 3, 'Erfolgreich abgeschlossen', ''),
(5, 4, 'Entregado', ''),
(5, 5, 'Livré', ''),
(5, 6, 'Consegnato', ''),
(6, 1, 'Canceled', 'order_canceled'),
(6, 2, 'Canceled', 'order_canceled'),
(6, 3, 'Storniert', 'order_canceled'),
(6, 4, 'Cancelada', 'order_canceled'),
(6, 5, 'Annulé', 'order_canceled'),
(6, 6, 'Annullato', 'order_canceled'),
(7, 1, 'Refund', 'refund'),
(7, 2, 'Refund', 'refund'),
(7, 3, 'Erstattet', 'refund'),
(7, 4, 'Reembolsado', 'refund'),
(7, 5, 'Remboursé', 'refund'),
(7, 6, 'Rimborsato', 'refund'),
(8, 1, 'Payment error', 'payment_error'),
(8, 2, 'Payment error', 'payment_error'),
(8, 3, 'Fehler bei der Bezahlung', 'payment_error'),
(8, 4, 'Error de pago', 'payment_error'),
(8, 5, 'Erreur de paiement', 'payment_error'),
(8, 6, 'Errore di pagamento', 'payment_error'),
(9, 1, 'On backorder', 'outofstock'),
(9, 2, 'On backorder', 'outofstock'),
(9, 3, 'Artikel erwartet', 'outofstock'),
(9, 4, 'Productos fuera de línea', 'outofstock'),
(9, 5, 'En attente de réapprovisionnement', 'outofstock'),
(9, 6, 'In attesa di rifornimento', 'outofstock'),
(10, 1, 'Awaiting bank wire payment', 'bankwire'),
(10, 2, 'Awaiting bank wire payment', 'bankwire'),
(10, 3, 'Warten auf Zahlungseingang', 'bankwire'),
(10, 4, 'En espera de pago por transferencia bancaria', 'bankwire'),
(10, 5, 'En attente du paiement par virement bancaire', 'bankwire'),
(10, 6, 'In attesa di pagamento con bonifico bancario', 'bankwire'),
(11, 1, 'Awaiting PayPal payment', ''),
(11, 2, 'Awaiting PayPal payment', ''),
(11, 3, 'Warten auf Zahlungseingang von PayPal', ''),
(11, 4, 'En espera de pago por PayPal', ''),
(11, 5, 'En attente du paiement par PayPal', ''),
(11, 6, 'In attesa di pagamento con PayPal', ''),
(12, 1, 'Payment remotely accepted', 'payment'),
(12, 2, 'Payment remotely accepted', 'payment'),
(12, 3, 'Payment Anmeldung erfolgreich', 'payment'),
(12, 4, 'Payment remotely accepted', 'payment'),
(12, 5, 'Paiement à distance accepté', 'payment'),
(12, 6, 'Payment remotely accepted', 'payment'),
(13, 1, 'Autorisation acceptée par PayPal', ''),
(13, 2, 'Autorisation acceptée par PayPal', ''),
(13, 3, 'Autorisation acceptée par PayPal', ''),
(13, 4, 'Autorisation acceptée par PayPal', ''),
(13, 5, 'Autorisation acceptée par PayPal', ''),
(13, 6, 'Autorisation acceptée par PayPal', '')

Now it works :)

PS: Sorry for my bad english i'm french :)

 

Hi! I have the same problem. Could you tell me how to add all the values to both the tables?

 

See attached the screenshot. post-810024-0-80795400-1407257441_thumb.png

 

Here's what I see in ps_order_state. How can I fill all the fields? 

 

It's the first time for me in creating tables.

 

Thank you in advance

Link to comment
Share on other sites

  • 1 month later...
  • 1 month later...
  • 2 weeks later...
  • 7 months later...
  • 7 months later...

I have the same problem with PS 1.6.9

I have update the module - reintialized it

an no working Error 500 in my bdd all fields are OK

Is anoone have the soltion ?

module or modification ?

Thancks

 

Hi to everybody. I just solved the problem in Presta 1.6. Its not easy as it seems. So few points here:

 

- copy bankwire module, rename it to bankwirecopy for example

- rename all files and all text which mentioned bankwire to bankwirecopy

- install the module

- in database table ps_order_state copy bankwire row

- in table ps_order_state_lang copy all bankwire rows and change id_order_state to the same value as was created in ps_order_state 

- in table ps_configuration copy PS_OS_BANKWIRE row, change name to PS_OS_BANKWIRECOPY and value to the number of id_order_state 

- in /config/config.inc.php copy row define('_PS_OS_BANKWIRE_', Configuration::get('PS_OS_BANKWIRE')); and rename it to BANKWIRECOPY

- copy email templates at /mails/some_language_shortcut/bankwire.html and bankwire.txt, rename it and change text in files

- enjoy multistore :)

  • Like 2
Link to comment
Share on other sites

  • 2 weeks later...

como resuelvo el siguiente problema 

[PrestaShopException]

Can't save Order
at line 345 in file classes/PaymentModule.php

340. // Creating order
341. $result = $order->add();
342.
343. if (!$result) {
344. PrestaShopLogger::addLog('PaymentModule::validateOrder - Order cannot be created', 3, null, 'Cart', (int)$id_cart, true);
345. throw new PrestaShopException('Can\'t save Order');
346. }
347.
348. // Amount paid by customer is not the right one -> Status = payment error
349. // We don't use the following condition to avoid the float precision issues : http://www.php.net/manual/en/language.types.float.php
350. // if ($order->total_paid != $order->total_paid_real)
  • PaymentModuleCore->validateOrder - [line 1160 - controllers/admin/AdminOrdersController.php] - [9 Arguments]
    1155. $employee = new Employee((int)Context::getContext()->cookie->id_employee);
    1156. $payment_module->validateOrder(
    1157. (int)$cart->id, (int)$id_order_state,
    1158. $cart->getOrderTotal(true, Cart::BOTH), $payment_module->displayName, $this->l('Manual order -- Employee:').' '.
    1159. substr($employee->firstname, 0, 1).'. '.$employee->lastname, array(), null, false, $cart->secure_key
    1160. );
    1161. if ($payment_module->currentOrder) {
    1162. Tools::redirectAdmin(self::$currentIndex.'&id_order='.$payment_module->currentOrder.'&vieworder'.'&token='.$this->token);
    1163. }
    1164. }
    1165. } else {
  • AdminOrdersControllerCore->postProcess - [line 178 - classes/controller/Controller.php]
    173. if (!$this->content_only && ($this->display_header || (isset($this->className) && $this->className))) {
    174. $this->setMedia();
    175. }
    176.
    177. // postProcess handles ajaxProcess
    178. $this->postProcess();
    179.
    180. if (!empty($this->redirect_after)) {
    181. $this->redirect();
    182. }
    183.
  • ControllerCore->run - [line 367 - classes/Dispatcher.php]
    362. if (isset($params_hook_action_dispatcher)) {
    363. Hook::exec('actionDispatcher', $params_hook_action_dispatcher);
    364. }
    365.
    366. // Running controller
    367. $controller->run();
    368. } catch (PrestaShopException $e) {
    369. $e->displayMessage();
    370. }
    371. }
    372.
  • DispatcherCore->dispatch - [line 58 - admin/index.php]
    53. if (!isset($_REQUEST['controller']) && isset($_REQUEST['tab'])) {
    54. $_REQUEST['controller'] = strtolower($_REQUEST['tab']);
    55. }
    56.
    57. // Prepare and trigger admin dispatcher
    58. Dispatcher::getInstance()->dispatch();
Link to comment
Share on other sites

  • 3 weeks later...

Hi, I update my shop to 1.6.1.4 and I can not save orders.

 

First I followed the instructions with renaming and reinstalling the bankwire module. Nothing happend, at the end I realized, that the

"compile php in any case" had not been set. So tried to redo everything. But it does not work.

I tried to finish the order with paypal. No success

Then I tried to finish the order with cheque payment, what never has been installed before. No succes..

Because I also set up a new shop -same releaese-, I made an order there and there it works. ?

I compared the PHP file which are in use, obvisously they are identic. Then I came to the conclusion, if the scripts are

correct and word on another installation, there mos be something wrong with the data in the tables.

 

I compared

prstshp_config and

prstsph_order_state and prstsph_order_state_lang and they are in sync.

 

So what to do, business currently can not work.

 

Here  is the situation with the error using cheque as payment method.

 

Any help, hint is welcome.

 

Thanks

 

[PrestaShopException]

Can't save Order
at line 345 in file classes/PaymentModule.php

340.                     // Creating order341.                     $result = $order->add();342. 343.                     if (!$result) {344.                         PrestaShopLogger::addLog('PaymentModule::validateOrder - Order cannot be created', 3, null, 'Cart', (int)$id_cart, true);345.                         throw new PrestaShopException('Can\'t save Order');346.                     }347. 348.                     // Amount paid by customer is not the right one -> Status = payment error349.                     // We don't use the following condition to avoid the float precision issues : http://www.php.net/manual/en/language.types.float.php350.                     // if ($order->total_paid != $order->total_paid_real)
  • PaymentModuleCore->validateOrder - [line 1160 - controllers/admin/AdminOrdersController.php] - [9 Arguments]
    1155.                     $employee = new Employee((int)Context::getContext()->cookie->id_employee);1156.                     $payment_module->validateOrder(1157.                         (int)$cart->id, (int)$id_order_state,1158.                         $cart->getOrderTotal(true, Cart::BOTH), $payment_module->displayName, $this->l('Manual order -- Employee:').' '.1159.                         substr($employee->firstname, 0, 1).'. '.$employee->lastname, array(), null, false, $cart->secure_key1160.                     );1161.                     if ($payment_module->currentOrder) {1162.                         Tools::redirectAdmin(self::$currentIndex.'&id_order='.$payment_module->currentOrder.'&vieworder'.'&token='.$this->token);1163.                     }1164.                 }1165.             } else {
  • AdminOrdersControllerCore->postProcess - [line 178 - classes/controller/Controller.php]
    173.             if (!$this->content_only && ($this->display_header || (isset($this->className) && $this->className))) {174.                 $this->setMedia();175.             }176. 177.             // postProcess handles ajaxProcess178.             $this->postProcess();179. 180.             if (!empty($this->redirect_after)) {181.                 $this->redirect();182.             }183. 
  • ControllerCore->run - [line 367 - classes/Dispatcher.php]
    362.             if (isset($params_hook_action_dispatcher)) {363.                 Hook::exec('actionDispatcher', $params_hook_action_dispatcher);364.             }365. 366.             // Running controller367.             $controller->run();368.         } catch (PrestaShopException $e) {369.             $e->displayMessage();370.         }371.     }372. 
  • DispatcherCore->dispatch - [line 58 - admin/index.php]
    53. if (!isset($_REQUEST['controller']) && isset($_REQUEST['tab'])) {54.     $_REQUEST['controller'] = strtolower($_REQUEST['tab']);55. }56. 57. // Prepare and trigger admin dispatcher58. Dispatcher::getInstance()->dispatch();
Link to comment
Share on other sites

I have the same problem and my tables ps_order_state and ps_order_state_lang was empty.

So insert with phpmyadmin the 2 tables 

ps_ is my prefix ! change it if your prefix db is not the same !

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);

ps_order_state_lang:

INSERT INTO `ps_order_state_lang` (`id_order_state`, `id_lang`, `name`, `template`) VALUES
(1, 1, 'Awaiting cheque payment', 'cheque'),
(1, 2, 'Awaiting cheque payment', 'cheque'),
(1, 3, 'Scheckzahlung wird erwartet', 'cheque'),
(1, 4, 'En espera de pago por cheque', 'cheque'),
(1, 5, 'En attente du paiement par chèque', 'cheque'),
(1, 6, 'In attesa di pagamento con assegno', 'cheque'),
(2, 1, 'Payment accepted', 'payment'),
(2, 2, 'Payment accepted', 'payment'),
(2, 3, 'Zahlung eingegangen', 'payment'),
(2, 4, 'Pago aceptamos', 'payment'),
(2, 5, 'Paiement accepté', 'payment'),
(2, 6, 'Pagamento accettato', 'payment'),
(3, 1, 'Preparation in progress', 'preparation'),
(3, 2, 'Preparation in progress', 'preparation'),
(3, 3, 'Bestellung eingegangen', 'preparation'),
(3, 4, 'Preparación en curso', 'preparation'),
(3, 5, 'Préparation en cours', 'preparation'),
(3, 6, 'Preparazione in corso', 'preparation'),
(4, 1, 'Shipped', 'shipped'),
(4, 2, 'Shipped', 'shipped'),
(4, 3, 'Versendet', 'shipped'),
(4, 4, 'Enviado', 'shipped'),
(4, 5, 'En cours de livraison', 'shipped'),
(4, 6, 'Consegna in corso', 'shipped'),
(5, 1, 'Delivered', ''),
(5, 2, 'Delivered', ''),
(5, 3, 'Erfolgreich abgeschlossen', ''),
(5, 4, 'Entregado', ''),
(5, 5, 'Livré', ''),
(5, 6, 'Consegnato', ''),
(6, 1, 'Canceled', 'order_canceled'),
(6, 2, 'Canceled', 'order_canceled'),
(6, 3, 'Storniert', 'order_canceled'),
(6, 4, 'Cancelada', 'order_canceled'),
(6, 5, 'Annulé', 'order_canceled'),
(6, 6, 'Annullato', 'order_canceled'),
(7, 1, 'Refund', 'refund'),
(7, 2, 'Refund', 'refund'),
(7, 3, 'Erstattet', 'refund'),
(7, 4, 'Reembolsado', 'refund'),
(7, 5, 'Remboursé', 'refund'),
(7, 6, 'Rimborsato', 'refund'),
(8, 1, 'Payment error', 'payment_error'),
(8, 2, 'Payment error', 'payment_error'),
(8, 3, 'Fehler bei der Bezahlung', 'payment_error'),
(8, 4, 'Error de pago', 'payment_error'),
(8, 5, 'Erreur de paiement', 'payment_error'),
(8, 6, 'Errore di pagamento', 'payment_error'),
(9, 1, 'On backorder', 'outofstock'),
(9, 2, 'On backorder', 'outofstock'),
(9, 3, 'Artikel erwartet', 'outofstock'),
(9, 4, 'Productos fuera de línea', 'outofstock'),
(9, 5, 'En attente de réapprovisionnement', 'outofstock'),
(9, 6, 'In attesa di rifornimento', 'outofstock'),
(10, 1, 'Awaiting bank wire payment', 'bankwire'),
(10, 2, 'Awaiting bank wire payment', 'bankwire'),
(10, 3, 'Warten auf Zahlungseingang', 'bankwire'),
(10, 4, 'En espera de pago por transferencia bancaria', 'bankwire'),
(10, 5, 'En attente du paiement par virement bancaire', 'bankwire'),
(10, 6, 'In attesa di pagamento con bonifico bancario', 'bankwire'),
(11, 1, 'Awaiting PayPal payment', ''),
(11, 2, 'Awaiting PayPal payment', ''),
(11, 3, 'Warten auf Zahlungseingang von PayPal', ''),
(11, 4, 'En espera de pago por PayPal', ''),
(11, 5, 'En attente du paiement par PayPal', ''),
(11, 6, 'In attesa di pagamento con PayPal', ''),
(12, 1, 'Payment remotely accepted', 'payment'),
(12, 2, 'Payment remotely accepted', 'payment'),
(12, 3, 'Payment Anmeldung erfolgreich', 'payment'),
(12, 4, 'Payment remotely accepted', 'payment'),
(12, 5, 'Paiement à distance accepté', 'payment'),
(12, 6, 'Payment remotely accepted', 'payment'),
(13, 1, 'Autorisation acceptée par PayPal', ''),
(13, 2, 'Autorisation acceptée par PayPal', ''),
(13, 3, 'Autorisation acceptée par PayPal', ''),
(13, 4, 'Autorisation acceptée par PayPal', ''),
(13, 5, 'Autorisation acceptée par PayPal', ''),
(13, 6, 'Autorisation acceptée par PayPal', '')

Now it works :)

PS: Sorry for my bad english i'm french :)

Dear,

 

I never worked on phpmyadmin and completely new in this field, could you please tell me how to insert the above query in into the tables??

 

Error I am getting while confirming order

[PrestaShopException]
 
Can't load Order status
at line 190 in file classes/PaymentModule.php
 
185.         }
186. 
187.         $order_status = new OrderState((int)$id_order_state, (int)$this->context->language->id);
188.         if (!Validate::isLoadedObject($order_status)) {
189.             PrestaShopLogger::addLog('PaymentModule::validateOrder - Order Status cannot be loaded', 3, null, 'Cart', (int)$id_cart, true);
190.             throw new PrestaShopException('Can\'t load Order status');
191.         }
192. 
193.         if (!$this->active) {
194.             PrestaShopLogger::addLog('PaymentModule::validateOrder - Module is not active', 3, null, 'Cart', (int)$id_cart, true);
195.             die(Tools::displayError());
PaymentModuleCore->validateOrder - [line 59 - modules/cashondelivery/controllers/front/validation.php] - [9 Arguments]
CashondeliveryValidationModuleFrontController->postProcess - [line 178 - classes/controller/Controller.php]
ControllerCore->run - [line 367 - classes/Dispatcher.php]
DispatcherCore->dispatch - [line 28 - index.php]

 

Regards

Link to comment
Share on other sites

×
×
  • Create New...