Bonek092 Posted October 4, 2018 Share Posted October 4, 2018 (edited) I warmly welcome, I have not found a solution to my problem anywhere (I searched the forum and internet but the topics and solutions related to this error did not fit my problem. In the attachment I am inserting a screen from the PrestaShop logs The situation is as follows: After passing the order process and selecting the delivery method, the customer receives a 500 error when clicking on the confirmation of the order. The difference between my problem and the rest of the problems with HTTP 500 when confirming the order is that, while going through the ordering process, errors like: some carriers from the machine add free shipping even though everything is set up as needed in Backoffice during the edition of carriers, although the previous ranges of weight were working properly, now they do not want to approve (even after removing and re-entering the same carrier with the same parameters, the order processing for the customer in BackOffice does not work, What have I done so far to overcome the above problem: I have reinstalled the COD, Bankwire and ShipToPay modules I restored backups of the store from a few days back (SQL database, files on the server), I have contacted the hosting provider where the page is placed (the fault does not lie on their side) I tried to add new carriers with the same settings (unsuccessfully), I checked the status of orders - everything is in place, no status has been removed accidentally, I did not update the store engine - the store was not updated by 1-Click-Upgrade (module not installed), automatic update in the server panel is disabled I do not know what may be wrong, customers did normal orders yesterday and today they do not. There have been no changes since about a week - no changes in Backoffice, no changes in files on the server. I would ask for quick help. Best wishes. Edited October 4, 2018 by Bonek092 (see edit history) Link to comment Share on other sites More sharing options...
Rolige Posted October 4, 2018 Share Posted October 4, 2018 Maybe you or a module has changed something in the db table of the carriers, try deleting all the carriers and create it again manually, at least one first for test purpose and try again. Link to comment Share on other sites More sharing options...
Bonek092 Posted October 5, 2018 Author Share Posted October 5, 2018 16 hours ago, Rolige said: Maybe you or a module has changed something in the db table of the carriers, try deleting all the carriers and create it again manually, at least one first for test purpose and try again. I tried to change and put dots instead of commas to current carriers, as well as create a new carrier and set the same ranges only with dots, however, it did not help. What to do next ? Link to comment Share on other sites More sharing options...
Knowband Plugins Posted October 5, 2018 Share Posted October 5, 2018 Do you have any idea what is 30,25 (As shown in the error the screenshot) ? It's cart total OR shipping etc? Do you have entered this thing in carriers? Link to comment Share on other sites More sharing options...
Bonek092 Posted October 5, 2018 Author Share Posted October 5, 2018 25 minutes ago, Knowband Plugins said: Do you have any idea what is 30,25 (As shown in the error the screenshot) ? It's cart total OR shipping etc? Do you have entered this thing in carriers? Unfortunately, I have no idea what can symbolize this value and where it can be typed. In flight settings, they did not enter any value characters like 30.25. Link to comment Share on other sites More sharing options...
Bonek092 Posted October 5, 2018 Author Share Posted October 5, 2018 (edited) I noticed something else. If I enter the value 30.25 in the product search field (basic price field), BackOffice throws me an error: Bad SQL query Something is wrong in your syntax next to '25 ORDER BY a.`id_product` ASC LIMIT 0, 50 'in line 14 And because of that, I need to restore the store from a backup because after refreshing the page the error remains. After entering 30.99 he also gets an error: Bad SQL query Something is wrong in your syntax next to '99 ORDER BY a .id_product` ASC LIMIT 0, 50 'in line 14 Edited October 5, 2018 by Bonek092 (see edit history) Link to comment Share on other sites More sharing options...
musicmaster Posted October 5, 2018 Share Posted October 5, 2018 That "30,25" is definitely wrong. Prestashop should have converted it to "30.25" (with a dot instead of a comma). Link to comment Share on other sites More sharing options...
Bonek092 Posted October 5, 2018 Author Share Posted October 5, 2018 11 minutes ago, musicmaster said: That "30,25" is definitely wrong. Prestashop should have converted it to "30.25" (with a dot instead of a comma). You're right, it's not the right value, but I can not find value anywhere. Someone recommended to me on PW to write again the clean peaks of the admin section, but it also did not help. Link to comment Share on other sites More sharing options...
musicmaster Posted October 5, 2018 Share Posted October 5, 2018 You write that you get the error when a customer finishes the order. But that means that this happens when the customer has made his payment and this happens when the payment provider uses the callback function to tell your shop that everything is ok. So there should be something wrong in the data that the payment provider sends back and you should ask them. Link to comment Share on other sites More sharing options...
Bonek092 Posted October 8, 2018 Author Share Posted October 8, 2018 On 5.10.2018 at 3:49 PM, musicmaster said: You write that you get the error when a customer finishes the order. But that means that this happens when the customer has made his payment and this happens when the payment provider uses the callback function to tell your shop that everything is ok. So there should be something wrong in the data that the payment provider sends back and you should ask them. Unfortunately, the problem also appeared when the customer chooses a cash-on-delivery package. Link to comment Share on other sites More sharing options...
Bonek092 Posted October 8, 2018 Author Share Posted October 8, 2018 I have removed all carriers, all data from the table ps_carrier and ps_range_price, I cleared the cache and when trying to enter a new carrier (ranges set using dots) I get an error: "An error occurred while saving the carrier ranges." Link to comment Share on other sites More sharing options...
Bonek092 Posted October 8, 2018 Author Share Posted October 8, 2018 I also tried to delete and re-create the ps_range_price table, however, and it did not bring any effects: CREATE TABLE `ps_range_price` ( `id_range_price` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT, `id_carrier` INT(10) UNSIGNED NOT NULL, `delimiter1` DECIMAL(20,6) NOT NULL, `delimiter2` DECIMAL(20,6) NOT NULL, PRIMARY KEY (`id_range_price`), UNIQUE INDEX `id_carrier` (`id_carrier`, `delimiter1`, `delimiter2`) Link to comment Share on other sites More sharing options...
musicmaster Posted October 8, 2018 Share Posted October 8, 2018 1 hour ago, Bonek092 said: I also tried to delete and re-create the ps_range_price table, however, and it did not bring any effects: CREATE TABLE `ps_range_price` ( `id_range_price` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT, `id_carrier` INT(10) UNSIGNED NOT NULL, `delimiter1` DECIMAL(20,6) NOT NULL, `delimiter2` DECIMAL(20,6) NOT NULL, PRIMARY KEY (`id_range_price`), UNIQUE INDEX `id_carrier` (`id_carrier`, `delimiter1`, `delimiter2`) For my taste you are on the wrong road. You should restore those tables from a backup or a fresh installation . They are not to blame. The "30,25" was created in the function getDeliveryPriceByPrice() in the file classes/carrier.php in the line "->where((float) $orderTotal.' >= r.`delimiter1`')". So somehow float() delivered a comma instead of a dot. Maybe that is a PHP setting. You could try it with a Hello World size program. Link to comment Share on other sites More sharing options...
Bonek092 Posted October 8, 2018 Author Share Posted October 8, 2018 2 hours ago, musicmaster said: For my taste you are on the wrong road. You should restore those tables from a backup or a fresh installation . They are not to blame. The "30,25" was created in the function getDeliveryPriceByPrice() in the file classes/carrier.php in the line "->where((float) $orderTotal.' >= r.`delimiter1`')". So somehow float() delivered a comma instead of a dot. Maybe that is a PHP setting. You could try it with a Hello World size program. I'm not so familiar with PHP. Can you help me with this problem in some way? : / Link to comment Share on other sites More sharing options...
Bonek092 Posted October 9, 2018 Author Share Posted October 9, 2018 http://comiesieczni.pl/test.php From what I see, the comma-to-dots comma function works fine. In order to check, I made the test.php file and put the following code in it: <?php echo str_replace(",",".",",,,,,,,,"); ?> It looks like everything is fine ... Link to comment Share on other sites More sharing options...
musicmaster Posted October 9, 2018 Share Posted October 9, 2018 3 hours ago, Bonek092 said: http://comiesieczni.pl/test.php From what I see, the comma-to-dots comma function works fine. In order to check, I made the test.php file and put the following code in it: <?php echo str_replace(",",".",",,,,,,,,"); ?> It looks like everything is fine ... Where did you get that function from? I gave you the code where the 30,25 comes from and that contains a "float()" function and no "str_replace()" Link to comment Share on other sites More sharing options...
Bonek092 Posted October 10, 2018 Author Share Posted October 10, 2018 Can you help me with this problem? I have this code from another forum to check. Link to comment Share on other sites More sharing options...
musicmaster Posted October 10, 2018 Share Posted October 10, 2018 If you pm me your ftp data I will have a look. Link to comment Share on other sites More sharing options...
Bonek092 Posted October 11, 2018 Author Share Posted October 11, 2018 Problem has been solved. I could start right away from this step. It was enough to turn off all non-standard modules so that carriers started to operate properly. Then I began to slowly diagnose the module after the teeth check module which one of these non-standard causes the problem. There was a blog module purchased from Presta Addons. After the module was reinstalled and the article backup was restored, everything returned to normal. Thank you for your comprehensive answers and for your time! Link to comment Share on other sites More sharing options...
Piotr Posted January 13 Share Posted January 13 Hello, Can you help me with HTTP500 problem after order confirmation with bank transfer payment. Other payment methods working correctly. Debug: Fatal error: Uncaught TypeError: Cannot access offset of type string on string in /../../../../public_html/var/cache/dev/smarty/compile/warehousechild/b9/77/56/b97756c07f8c7dd53da6530f78f67ddd242f77c9_2.module.ps_currencyselectorps_currencyselector.tpl.php:28 Stack trace: #0 /../../../../public_html/vendor/smarty/smarty/libs/sysplugins/smarty_template_resource_base.php(123): content_6784e83bda14a1_64834384(Object(SmartyDevTemplate)) #1 /../../../../public_html/vendor/smarty/smarty/libs/sysplugins/smarty_template_compiled.php(114): Smarty_Template_Resource_Base->getRenderedTemplateCode(Object(SmartyDevTemplate)) #2 /../../../../public_html/vendor/smarty/smarty/libs/sysplugins/smarty_internal_template.php(217): Smarty_Template_Compiled->render(Object(SmartyDevTemplate)) #3 /../../../../public_html/vendor/smarty/smarty/libs/sysplugins/smarty_internal_templatebase.php(238): Smarty_Internal_Template->render(false, 0) #4 /../../../../public_html/vendor/smarty/smarty/libs/sysplugins/smarty_internal_templatebase.php(116): Smarty_Internal_TemplateBase->_execute(Object(SmartyDevTemplate), NULL, NULL, NULL, 0) #5 /../../../../public_html/classes/Smarty/SmartyDevTemplate.php(55): Smarty_Internal_TemplateBase->fetch(NULL, NULL, NULL, NULL) #6 /../../../../public_html/classes/module/Module.php(2273): SmartyDevTemplateCore->fetch() #7 /../../../../public_html/modules/ps_currencyselector/ps_currencyselector.php(129): ModuleCore->fetch('module:ps_curre...') #8 /../../../../public_html/classes/Hook.php(1088): Ps_Currencyselector->renderWidget('displayNav2', Array) #9 /../../../../public_html/override/classes/Hook.php(42): HookCore::coreRenderWidget(Object(Ps_Currencyselector), 'displayNav2', Array) #10 /../../../../public_html/classes/Hook.php(1019): Hook::coreRenderWidget(Object(Ps_Currencyselector), 'displayNav2', Array) #11 /../../../../public_html/config/smarty.config.inc.php(201): HookCore::exec('displayNav2', Array, NULL) #12 /../../../../public_html/classes/Smarty/SmartyLazyRegister.php(81): smartyHook(Array, Object(SmartyDevTemplate)) #13 /../../../../public_html/var/cache/dev/smarty/compile/warehousechildlayouts_layout_full_width_tpl/5e/b7/49/5eb749286b8cf5708e8039f359c33f243a05fc48_2.file.header.tpl.php(114): SmartyLazyRegister->__call('smartyHook', Array) #14 /../../../../public_html/vendor/smarty/smarty/libs/sysplugins/smarty_internal_runtime_inheritance.php(248): Block_3504532596784e83bd20624_62755666->callBlock(Object(SmartyDevTemplate)) #15 /../../../../public_html/vendor/smarty/smarty/libs/sysplugins/smarty_internal_runtime_inheritance.php(184): Smarty_Internal_Runtime_Inheritance->callBlock(Object(Block_3504532596784e83bd20624_62755666), Object(SmartyDevTemplate)) #16 /../../../../public_html/vendor/smarty/smarty/libs/sysplugins/smarty_internal_runtime_inheritance.php(156): Smarty_Internal_Runtime_Inheritance->process(Object(SmartyDevTemplate), Object(Block_3504532596784e83bd20624_62755666)) #17 /../../../../public_html/var/cache/dev/smarty/compile/warehousechildlayouts_layout_full_width_tpl/5e/b7/49/5eb749286b8cf5708e8039f359c33f243a05fc48_2.file.header.tpl.php(44): Smarty_Internal_Runtime_Inheritance->instanceBlock(Object(SmartyDevTemplate), 'Block_350453259...', 'header_nav') #18 /../../../../public_html/vendor/smarty/smarty/libs/sysplugins/smarty_template_resource_base.php(123): content_6784e83bd2a528_86713859(Object(SmartyDevTemplate)) #19 /../../../../public_html/vendor/smarty/smarty/libs/sysplugins/smarty_template_compiled.php(114): Smarty_Template_Resource_Base->getRenderedTemplateCode(Object(SmartyDevTemplate)) #20 /../../../../public_html/vendor/smarty/smarty/libs/sysplugins/smarty_internal_template.php(217): Smarty_Template_Compiled->render(Object(SmartyDevTemplate)) #21 /../../../../public_html/vendor/smarty/smarty/libs/sysplugins/smarty_internal_template.php(386): Smarty_Internal_Template->render() #22 /../../../../public_html/var/cache/dev/smarty/compile/warehousechildlayouts_layout_full_width_tpl/a1/26/73/a12673b01297cb5cb7b78540a3e690c0b9131dbc_2.file.layout-both-columns.tpl.php(280): Smarty_Internal_Template->_subTemplateRender('file:_partials/...', NULL, 'warehousechildl...', 0, 3600, Array, 0, false) #23 /../../../../public_html/vendor/smarty/smarty/libs/sysplugins/smarty_internal_runtime_inheritance.php(248): Block_12860662806784e83bc8ca34_60950856->callBlock(Object(SmartyDevTemplate)) #24 /../../../../public_html/vendor/smarty/smarty/libs/sysplugins/smarty_internal_runtime_inheritance.php(184): Smarty_Internal_Runtime_Inheritance->callBlock(Object(Block_12860662806784e83bc8ca34_60950856), Object(SmartyDevTemplate)) #25 /../../../../public_html/vendor/smarty/smarty/libs/sysplugins/smarty_internal_runtime_inheritance.php(156): Smarty_Internal_Runtime_Inheritance->process(Object(SmartyDevTemplate), Object(Block_12860662806784e83bc8ca34_60950856)) #26 /../../../../public_html/var/cache/dev/smarty/compile/warehousechildlayouts_layout_full_width_tpl/a1/26/73/a12673b01297cb5cb7b78540a3e690c0b9131dbc_2.file.layout-both-columns.tpl.php(77): Smarty_Internal_Runtime_Inheritance->instanceBlock(Object(SmartyDevTemplate), 'Block_128606628...', 'header') #27 /../../../../public_html/vendor/smarty/smarty/libs/sysplugins/smarty_template_resource_base.php(123): content_6784e83bc9dbe9_68980045(Object(SmartyDevTemplate)) #28 /../../../../public_html/vendor/smarty/smarty/libs/sysplugins/smarty_template_compiled.php(114): Smarty_Template_Resource_Base->getRenderedTemplateCode(Object(SmartyDevTemplate)) #29 /../../../../public_html/vendor/smarty/smarty/libs/sysplugins/smarty_internal_template.php(217): Smarty_Template_Compiled->render(Object(SmartyDevTemplate)) #30 /../../../../public_html/vendor/smarty/smarty/libs/sysplugins/smarty_internal_template.php(386): Smarty_Internal_Template->render() #31 /../../../../public_html/vendor/smarty/smarty/libs/sysplugins/smarty_internal_runtime_inheritance.php(116): Smarty_Internal_Template->_subTemplateRender('layouts/layout-...', NULL, 'warehousechildl...', 0, 3600, Array, 2, false, NULL, NULL) #32 /../../../../public_html/var/cache/dev/smarty/compile/warehousechildlayouts_layout_full_width_tpl/a9/e7/e5/a9e7e5a88497c625b4fa2fb46f6e2664eac473b9_2.file.layout-full-width.tpl.php(50): Smarty_Internal_Runtime_Inheritance->endChild(Object(SmartyDevTemplate), 'layouts/layout-...') #33 /../../../../public_html/vendor/smarty/smarty/libs/sysplugins/smarty_template_resource_base.php(123): content_6784e83bc832e0_18242225(Object(SmartyDevTemplate)) #34 /../../../../public_html/vendor/smarty/smarty/libs/sysplugins/smarty_template_compiled.php(114): Smarty_Template_Resource_Base->getRenderedTemplateCode(Object(SmartyDevTemplate)) #35 /../../../../public_html/vendor/smarty/smarty/libs/sysplugins/smarty_internal_template.php(217): Smarty_Template_Compiled->render(Object(SmartyDevTemplate)) #36 /../../../../public_html/vendor/smarty/smarty/libs/sysplugins/smarty_internal_template.php(386): Smarty_Internal_Template->render() #37 /../../../../public_html/vendor/smarty/smarty/libs/sysplugins/smarty_internal_runtime_inheritance.php(116): Smarty_Internal_Template->_subTemplateRender('layouts/layout-...', NULL, 'warehousechildl...', 0, 3600, Array, 2, false, NULL, NULL) #38 /../../../../public_html/var/cache/dev/smarty/compile/warehousechildlayouts_layout_full_width_tpl/17/be/b4/17beb4c0f71b7a167d694a9402edbc89da45a497_2.file.page.tpl.php(33): Smarty_Internal_Runtime_Inheritance->endChild(Object(SmartyDevTemplate), 'layouts/layout-...') #39 /../../../../public_html/vendor/smarty/smarty/libs/sysplugins/smarty_template_resource_base.php(123): content_6784e8506cba59_61208703(Object(SmartyDevTemplate)) #40 /../../../../public_html/vendor/smarty/smarty/libs/sysplugins/smarty_template_compiled.php(114): Smarty_Template_Resource_Base->getRenderedTemplateCode(Object(SmartyDevTemplate)) #41 /../../../../public_html/vendor/smarty/smarty/libs/sysplugins/smarty_internal_template.php(217): Smarty_Template_Compiled->render(Object(SmartyDevTemplate)) #42 /../../../../public_html/vendor/smarty/smarty/libs/sysplugins/smarty_internal_template.php(386): Smarty_Internal_Template->render() #43 /../../../../public_html/vendor/smarty/smarty/libs/sysplugins/smarty_internal_runtime_inheritance.php(116): Smarty_Internal_Template->_subTemplateRender('page.tpl', NULL, 'warehousechildl...', 0, 3600, Array, 2, false, NULL, NULL) #44 /../../../../public_html/var/cache/dev/smarty/compile/warehousechildlayouts_layout_full_width_tpl/74/87/f2/7487f25c01727e2e3fa8c3c6b9e1d5ee5469bcc4_2.file.order-confirmation.tpl.php(39): Smarty_Internal_Runtime_Inheritance->endChild(Object(SmartyDevTemplate), 'page.tpl') #45 /../../../../public_html/vendor/smarty/smarty/libs/sysplugins/smarty_template_resource_base.php(123): content_6784e8811b5b74_85912577(Object(SmartyDevTemplate)) #46 /../../../../public_html/vendor/smarty/smarty/libs/sysplugins/smarty_template_compiled.php(114): Smarty_Template_Resource_Base->getRenderedTemplateCode(Object(SmartyDevTemplate)) #47 /../../../../public_html/vendor/smarty/smarty/libs/sysplugins/smarty_internal_template.php(217): Smarty_Template_Compiled->render(Object(SmartyDevTemplate)) #48 /../../../../public_html/vendor/smarty/smarty/libs/sysplugins/smarty_internal_templatebase.php(238): Smarty_Internal_Template->render(false, 0) #49 /../../../../public_html/vendor/smarty/smarty/libs/sysplugins/smarty_internal_templatebase.php(116): Smarty_Internal_TemplateBase->_execute(Object(SmartyDevTemplate), NULL, 'warehousechildl...', NULL, 0) #50 /../../../../public_html/classes/Smarty/SmartyDev.php(40): Smarty_Internal_TemplateBase->fetch('checkout/order-...', NULL, 'warehousechildl...', NULL) #51 /../../../../public_html/classes/controller/FrontController.php(760): SmartyDev->fetch('checkout/order-...', NULL, 'warehousechildl...') #52 /../../../../public_html/classes/controller/FrontController.php(742): FrontControllerCore->smartyOutputContent('checkout/order-...') #53 /../../../../public_html/classes/controller/Controller.php(339): FrontControllerCore->display() #54 /../../../../public_html/classes/Dispatcher.php(510): ControllerCore->run() #55 /../../../../public_html/index.php(28): DispatcherCore->dispatch() #56 {main} thrown in /../../../../public_html/var/cache/dev/smarty/compile/warehousechild/b9/77/56/b97756c07f8c7dd53da6530f78f67ddd242f77c9_2.module.ps_currencyselectorps_currencyselector.tpl.php on line 28 I not have any idea. Thank you. Prestahop 8.1.7 PHP: 8.1.31 Link to comment Share on other sites More sharing options...
Maxflor Posted March 3 Share Posted March 3 Please, I have a similar problem on prestashop 1.7.8.11 - can you give me some advice on how to solve it? Thank you 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