Jump to content

[solved x 2 closed] Getting error in Cash On Delivery module


Recommended Posts

Hi,

My customer are facing one problem while placing order from front-end. I have enabled only 'Cash On Delivery' module. On last step when user clicks on "I confirm my order", it gives 500 Server error, but in actual order placed successfully. I tried to check and solve but with no help from any other post. Can any one please tell me what is the wrong.

Also I want to assign default order status to "Preparation in progress", in previous version that was happening but after upgrading it is just assigning blank - to every new order. Is this causing problem on confirm page.

 

Please provide details.

post-739313-0-75581400-1404387900_thumb.png

Link to comment
Share on other sites

Hi,

My customer are facing one problem while placing order from front-end. I have enabled only 'Cash On Delivery' module. On last step when user clicks on "I confirm my order", it gives 500 Server error, but in actual order placed successfully. I tried to check and solve but with no help from any other post. Can any one please tell me what is the wrong.

Also I want to assign default order status to "Preparation in progress", in previous version that was happening but after upgrading it is just assigning blank - to every new order. Is this causing problem on confirm page.

 

Please provide details.

 

Satyen,

 

I have enabled the COD module but I cannot reproduce your error. I am using a fresh install of 1.6.0.8 with default theme. Can you give more info on your setup - what PS version, upgrade or fresh install, default theme or not, etc..

 

regards.

RJ

Link to comment
Share on other sites

Satyen,

 

I have enabled the COD module but I cannot reproduce your error. I am using a fresh install of 1.6.0.8 with default theme. Can you give more info on your setup - what PS version, upgrade or fresh install, default theme or not, etc..

 

regards.

RJ

 

Hi,

Thanks for trying, I did upgrade from PS1.5 to PS1.6.0.6. Initially this module and all other things were working correct but after recent updates of few modules this problem came into notice. Right now I am using PS 1.6.0.6 with default theme.

Regards.

when you get a 500 or blank page, you need to get the underlying (hidden) error

 

open config/defines.inc.php

 

set to true

define('_PS_MODE_DEV_', false);

 

note: set to false when done

 

now recreate the error, and search on the error to find possible solution.

 

 

@El Patron

I will try this and put more information here.

Thanks.

Edited by satyen (see edit history)
  • Like 1
Link to comment
Share on other sites

when you get a 500 or blank page, you need to get the underlying (hidden) error

 

open config/defines.inc.php

 

set to true

define('_PS_MODE_DEV_', false);

 

note: set to false when done

 

now recreate the error, and search on the error to find possible solution.

 

 

Hi,

Thanks this helped me to identify where error comes from, it was coming from one module named "Order reference change module".

Thank you El Patron.

 

 
Link to comment
Share on other sites

  • 1 month later...

I'm having the same problem, below you can find the error message. It was working perfect until it suddenly stopped.

 

 
Can't load Order status
at line 174 in file classes/PaymentModule.php
 
168. 
169. $order_status = new OrderState((int)$id_order_state, (int)$this->context->language->id);
170. if (!Validate::isLoadedObject($order_status))
171. {
172. PrestaShopLogger::addLog('PaymentModule::validateOrder - Order Status cannot be loaded', 3, null, 'Cart', (int)$id_cart, true);
173. throw new PrestaShopException('Can\'t load Order status');
174. }
175. 
176. if (!$this->active)
177. {
178. PrestaShopLogger::addLog('PaymentModule::validateOrder - Module is not active', 3, null, 'Cart', (int)$id_cart, true);
PaymentModuleCore->validateOrder - [line 59 - modules/cashondelivery/controllers/front/validation.php] - [9 Arguments]
CashondeliveryValidationModuleFrontController->postProcess - [line 171 - classes/controller/Controller.php]
ControllerCore->run - [line 373 - classes/Dispatcher.php]
DispatcherCore->dispatch - [line 28 - index.php]
Link to comment
Share on other sites

 

I'm having the same problem, below you can find the error message. It was working perfect until it suddenly stopped.

 

 
Can't load Order status
at line 174 in file classes/PaymentModule.php
 
168. 
169. $order_status = new OrderState((int)$id_order_state, (int)$this->context->language->id);
170. if (!Validate::isLoadedObject($order_status))
171. {
172. PrestaShopLogger::addLog('PaymentModule::validateOrder - Order Status cannot be loaded', 3, null, 'Cart', (int)$id_cart, true);
173. throw new PrestaShopException('Can\'t load Order status');
174. }
175. 
176. if (!$this->active)
177. {
178. PrestaShopLogger::addLog('PaymentModule::validateOrder - Module is not active', 3, null, 'Cart', (int)$id_cart, true);
PaymentModuleCore->validateOrder - [line 59 - modules/cashondelivery/controllers/front/validation.php] - [9 Arguments]
CashondeliveryValidationModuleFrontController->postProcess - [line 171 - classes/controller/Controller.php]
ControllerCore->run - [line 373 - classes/Dispatcher.php]
DispatcherCore->dispatch - [line 28 - index.php]

 

 

 

maybe missing bo-->orders-->statues, please check to clean shop

 

09.07.2014-08.11.png

http://screencast.com/t/fOCFhmtEi7

Link to comment
Share on other sites

I did a cleanup off these ... apparently to much removed ... which one should I add?

error.png

 

I am not sure that adding them will help as this has changed somewhat since I did any payment type modules.

 

If you have access to phpmyadmin, and can create a native (vanialla) install of your ps version, then you can export from good db the ps_order_state and ps_order_state_langs files, then remove those tables from your production shop (rename them for back up) and then import good table.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...