wohldorff Posted January 19, 2017 Share Posted January 19, 2017 Sometimes after customers have been directed to Paypal for payment and are being returned the shop the purchasing process is interrupted an no purchasing confirmation is generated (only the message sent py Paypal indicates that a customer tried to purchase). The log files says: *ERROR* 2017/01/11 - 11:20:22: Can't save Order at line 345 in file classes/PaymentModule.php My PS version is 1.6.1.5 Has anybody solved this nasty problem? Link to comment Share on other sites More sharing options...
shokinro Posted January 19, 2017 Share Posted January 19, 2017 It could be various causes. but most cases is related to shipping related or payment related error I think. below the code where the error is raised. If you have enabled DEV mode, there might be more error message that can give you hints. $result = $order->add(); if (!$result) { PrestaShopLogger::addLog('PaymentModule::validateOrder - Order cannot be created', 3, null, 'Cart', (int)$id_cart, true); throw new PrestaShopException('Can\'t save Order'); Forgot to mention, you can enable DEV mode by setting _PS_MODE_DEV_ to true in file /config/defines.inc.php Link to comment Share on other sites More sharing options...
shokinro Posted January 19, 2017 Share Posted January 19, 2017 forgot to mention, you can enable DEV mode by setting _PS_MODE_DEV_ to true in file /config/defines.inc.php Link to comment Share on other sites More sharing options...
wohldorff Posted January 19, 2017 Author Share Posted January 19, 2017 Thanks for the analysis! Payment via Paypal works flawlessly and does not generate errors, however sometimes upon returning to the shop apparently something goes wrong - but not always.. A nasty situation that requires a manual order setup every time it happens. I have set _PS_MODE_DEV_ to true so let's see what happens. Link to comment Share on other sites More sharing options...
shokinro Posted January 19, 2017 Share Posted January 19, 2017 The error message will only shows to the customer (user) who see the page, unless you have enabled error logging that you can cache from log. Link to comment Share on other sites More sharing options...
wohldorff Posted January 19, 2017 Author Share Posted January 19, 2017 How do I enable extended error logging? Link to comment Share on other sites More sharing options...
shokinro Posted January 19, 2017 Share Posted January 19, 2017 Error report level configuration should be in same file. Link to comment Share on other sites More sharing options...
wohldorff Posted January 19, 2017 Author Share Posted January 19, 2017 Do I have to change something here (in /config/defines.inc.php)? define('_PS_DISPLAY_COMPATIBILITY_WARNING_', false); if (_PS_MODE_DEV_ === true) { @ini_set('display_errors', 'on'); @error_reporting(E_ALL | E_STRICT); define('_PS_DEBUG_SQL_', true); } else { @ini_set('display_errors', 'off'); define('_PS_DEBUG_SQL_', false); } define('_PS_DEBUG_PROFILING_', false); define('_PS_MODE_DEMO_', false); Link to comment Share on other sites More sharing options...
shokinro Posted January 19, 2017 Share Posted January 19, 2017 Sorry for confusing. The error log level can be changed at back office - Advanced Parameters - Logs tab Link to comment Share on other sites More sharing options...
wohldorff Posted January 19, 2017 Author Share Posted January 19, 2017 Thanks! Done. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now