Jump to content

Recommended Posts

Hi there,

 

I'm just using Prestashop and installed the latest version 1.6 (Dutch language). For the check-out I'm using the Cash on delivery module but with the last step I receive a 500 server error. I tried to find the right answer but I'm stuck so I hope someone can help me.

 

The error show is:

 

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

    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 mean that this module uses order state with number stored in ID = $id_order_state (this variable contains number)

does this number exists in your order state as an ID of state? 

 

go to orders > states in back office and check it. if this id doesnt exist - you have to create it manually or change this number for some other id that exists

Link to comment
Share on other sites

Sorry but I'm pretty a newbe in this. I just have the standard installation of prestashop 1.6.

I can't find anything which says order_state in there. This is what I see:

 

Orders > Status

 

Status

 

ID 2. Order received

ID 5. Delivered

ID 11. Regular client yet invoiced

ID 12.. Regular client billed.

 

Retour status

 

ID 1. Waiting for confirmation

ID 2. Waiting for package

ID 3. Package received

ID 4. Return denied

ID 5. Return completed

 

I can create a new status but it's kinda Chinese to me. Is there an easy way to get this module working?

Link to comment
Share on other sites

  • 2 weeks later...
  • 1 year later...

you use default cash on delivery module?if so, what version?

HI vekia i'm using prestashop 1.6.0.9 i have 500 server error on COD i confirm my order. it is when the user entering additional message otherwise it is working fine. And same happening at admin side when adding a message in message area.

 

Please check the attached PDF file that thing i got at http://frenchbob.com/module/cashondelivery/validation when i set ps_dev_mode to TRUE 

frenchbob3.pdf

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

  • 7 months later...
  • 2 months later...

I did what You advised me. Here is the result

Fatal error: Uncaught exception 'UnexpectedValueException' with message 'RecursiveDirectoryIterator::__construct(/home/missnin/public_html/cache/smarty/cache/crossselling/shoppingcart/12/35/60/81/84/133/143/214/216/221/224/225/228/229/236/238/242/243/244/245/246/249/251/253/255/256/257/258/259/1/236/53/2b/31): failed to open dir: Too many open files' in /home/missnin/public_html/tools/smarty/sysplugins/smarty_internal_cacheresource_file.php:180 Stack trace: #0 [internal function]: RecursiveDirectoryIterator->__construct('/home/missnin/p...', 0) #1 /home/missnin/public_html/tools/smarty/sysplugins/smarty_internal_cacheresource_file.php(180): RecursiveDirectoryIterator->getChildren() #2 /home/missnin/public_html/tools/smarty/Smarty.class.php(777): Smarty_Internal_CacheResource_File->clear(Object(Smarty), '/home/missnin/p...', 'crossselling', NULL, NULL) #3 /home/missnin/public_html/classes/Tools.php(2596): Smarty->clearCache('/home/missnin/p...', 'crossselling', NULL) #4 /home/missnin/public_html/classes/module/Module.php(2 in/home/missnin/public_html/tools/smarty/sysplugins/smarty_internal_cacheresource_file.php on line 180

Link to comment
Share on other sites

When I open the page , that is writen

 

Warning: scandir(/home/missnin/public_html/modules/powatag/classes/helper/): failed to open dir: No such file or directory in /home/missnin/public_html/modules/powatag/powatag.php on line 79

 

Warning: scandir(): (errno 2): No such file or directory in /home/missnin/public_html/modules/powatag/powatag.php on line 79

 

Warning: Invalid argument supplied for foreach() in /home/missnin/public_html/modules/powatag/powatag.php on line 79

Link to comment
Share on other sites

I'm not sure exactly. Maybe ulimit? The page I linked to says:

 

 

This can be a limitation on the server where the code is running. Every operating system only allows for a certain number of open files/handles/sockets. This limit is usually further reduced when the server is virtualized. On a Linux server you can check the current limit with ulimit -n, if you have root access you can increase it with the same command. I assume there is a method for Windows server as well. Otherwise there is not much you can do about it (except ask your hoster or administrator to increase it).

More configurable limitations:

In /etc/security/limits.conf
soft nofile
1024
hard nofile 65535
Increase ulimit by "ulimit -n 65535"
echo 65535 > /proc/sys/fs/file-max
In /etc/sysctl.conf
fs
.file-max=65535

Link to comment
Share on other sites

  • 2 years later...
On ‎10‎/‎11‎/‎2016 at 5:46 AM, rocky said:

Edit config/defines.inc.php and change the value of _PS_DEV_MODE_ from false to true and you should see an error message instead of a 500 error that can be used to debug the issue.

 

On ‎10‎/‎11‎/‎2016 at 3:50 PM, [email protected] said:

Thank you! The problem is solved.

good 1... debug is ON

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...