Jump to content

error 500 - order confirm


Recommended Posts

hi

my ecommerce is http://www.forni-a-legna.com/acquista

i have a problem with payment / confirm order go in error

[PrestaShopException]

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

150.         if (Configuration::get('PS_TAX_ADDRESS_TYPE') == 'id_address_delivery')
151.             $context_country = $this->context->country;
152.
153.         $order_status = new OrderState((int)$id_order_state, (int)$this->context->language->id);
154.         if (!Validate::isLoadedObject($order_status))
155.             throw new PrestaShopException('Can\'t load Order status');
156.
157.         if (!$this->active)
158.             die(Tools::displayError());
159.         // Does order already exists ?
160.         if (Validate::isLoadedObject($this->context->cart) && $this->context->cart->OrderExists() == false)

 

for test try to order and choose bankwire, when push the order confirmation go in error

why?

help me

Link to comment
Share on other sites

If you understand spanish read this:

http://www.prestashop.com/forums/topic/335764-500-server-error-en-transferencia-bancaria-y-contra-reembolso/page-2

 

Check your Id values in Order status if they don't start by Id =1  or  Order Statuses are empty or have missing records you could have the same problem than me.

I upgraded from 1.5 version to 1.6 using 1-click-upgrade. 

 

It seems that payments modules have the status Id hardcoded in the php code. So if they don't find the appropiate Status Id in the file ps_order_state and in the file ps_order_state_lang you get this error 500.

 

Two possibles ways to deal with this problem are:

 

OPTION 1

1) Install a clean prestashop 1.6 version on a local host

2) Using PhpMyAdmin on your local host export to a csv file the table ps_order_state of this new database. Save the csv file to a place you can find it easily.

3) Using PhpMyAdmin on your local host export to a csv file the table ps_order_state_lang of this new database. Save the csv file to a place you can find it easily

 

4) Now go to your hosting and access phpmyadmin.

5) Click your database and search the table ps_order_state.

6) Select import 

7) Select the ps_order_state.csv file saved previously.

8) Check overwrite and do the import.

   your ps_order_state should have now the standard prestashop IDs

 

Now do the same with ps_order_state_lang

9) click the table ps_order_state_lang

10) Select import

11) Select the ps_order_state_lang.csv file saved previously.

12) Check the overwrite option and execute the import.

Now your ps_order_state should have now the standar prestashop IDs

 

Test your shop. It should work.

 

 

 

You can find the csv files used in the following post.. So you dont need to install local prestashop and export them.

 

OPTION 2.

 

Enter directly in your database and edit both tables  using the original values once you know them.

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

×
×
  • Create New...