Post by artyfly » Wed Sep 29, 2021 4:01 am

...
Last edited by artyfly on Mon May 09, 2022 5:06 am, edited 1 time in total.

Newbie

Posts

Joined
Sat Jun 13, 2020 1:47 am

Post by straightlight » Wed Sep 29, 2021 4:43 am

artyfly wrote:
Wed Sep 29, 2021 4:01 am
hi there,

We had a developer build a custom checkout for us but we're having intermittent issues with the session order_id being unset after the confirm step loads, causing errors in the log like the ones below, and the order ending up stuck in the missing orders list. This appears to affect all payment methods, but not every order. We can't really identify why it does it sometimes but not others... but it happens almost every time on our testing domain.

2021-09-28 19:45:52 - PHP Notice: Undefined index: order_id in [path]/public_html/catalog/controller/extension/payment/free_checkout.php on line 13
2021-09-28 19:45:52 - PHP Notice: Trying to access array offset on value of type bool in [path]/public_html/catalog/controller/extension/total/voucher.php on line 54

We've tried troubleshooting and can confirm that the order_id is set as it's supposed to be when the confirm step loads (tested by posting it to the console log upon load), but is for some reason unset, or otherwise unavailable by the time the payment method save() function is called, resulting in the errors in the log and the order status not being set, leaving it in the missing orders list.

Happy to pay for someone's time to fix it for us!

We've setup a fresh OC install on a staging domain (oc 3.0.3.8) and installed the extension for testing, to confirm it wasn't just a conflict with another mod. We'll provide access to that domain for you to investigate.

Shoot me a message for more info.
Thanks in advance!!
Note: In respect this topic was posted in the Commercial Support section of the forum, OC version incomplete. 4 digits. As for the catalog/controller/extension/total/voucher.php file, on line 54,

find:

Code: Select all

if (in_array($order_info['order_status_id'], $this->config->get('config_complete_status'))) {
replace with:

Code: Select all

if (in_array($order_info['order_status_id'], (array)$this->config->get('config_complete_status'))) {
This should resolve the issue. Ensure to clear both OC caches prior to test the changes during checkout or during the admin API orders.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by paulfeakins » Wed Sep 29, 2021 5:03 am

Feel free to email us with all the details for a quick estimate: info@antropy.co.uk

UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk


User avatar
Guru Member
Online

Posts

Joined
Mon Aug 22, 2011 11:01 pm
Location - London Gatwick, United Kingdom

Post by artyfly » Wed Sep 29, 2021 6:36 am

...
Last edited by artyfly on Mon May 09, 2022 5:58 am, edited 1 time in total.

Newbie

Posts

Joined
Sat Jun 13, 2020 1:47 am

Post by straightlight » Wed Sep 29, 2021 7:15 am

artyfly wrote:
Wed Sep 29, 2021 6:36 am
straightlight wrote:
Wed Sep 29, 2021 4:43 am
artyfly wrote:
Wed Sep 29, 2021 4:01 am
hi there,

We had a developer build a custom checkout for us but we're having intermittent issues with the session order_id being unset after the confirm step loads, causing errors in the log like the ones below, and the order ending up stuck in the missing orders list. This appears to affect all payment methods, but not every order. We can't really identify why it does it sometimes but not others... but it happens almost every time on our testing domain.

2021-09-28 19:45:52 - PHP Notice: Undefined index: order_id in [path]/public_html/catalog/controller/extension/payment/free_checkout.php on line 13
2021-09-28 19:45:52 - PHP Notice: Trying to access array offset on value of type bool in [path]/public_html/catalog/controller/extension/total/voucher.php on line 54

We've tried troubleshooting and can confirm that the order_id is set as it's supposed to be when the confirm step loads (tested by posting it to the console log upon load), but is for some reason unset, or otherwise unavailable by the time the payment method save() function is called, resulting in the errors in the log and the order status not being set, leaving it in the missing orders list.

Happy to pay for someone's time to fix it for us!

We've setup a fresh OC install on a staging domain (oc 3.0.3.8) and installed the extension for testing, to confirm it wasn't just a conflict with another mod. We'll provide access to that domain for you to investigate.

Shoot me a message for more info.
Thanks in advance!!
Note: In respect this topic was posted in the Commercial Support section of the forum, OC version incomplete. 4 digits. As for the catalog/controller/extension/total/voucher.php file, on line 54,

find:

Code: Select all

if (in_array($order_info['order_status_id'], $this->config->get('config_complete_status'))) {
replace with:

Code: Select all

if (in_array($order_info['order_status_id'], (array)$this->config->get('config_complete_status'))) {
This should resolve the issue. Ensure to clear both OC caches prior to test the changes during checkout or during the admin API orders.
Thanks for the response. Although that would fix the voucher error in the log, the main issue is that the order being placed does not get the initial order status update so it gets stuck in the missing orders list.
Yes, that is correct. The fix on the above was only for the voucher to help you speed up the process but was not related to the entire issue that was addressed. You did, however, posted in the right location on the forum for further assistance. If you'd like, I could take a look at the issue for you as a custom job. Send me a direct PM on the forum for a quote.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by Linneajones » Wed Sep 29, 2021 3:40 pm

Hello there,

I would like to assist you with this work.
Please get connected to discuss further.

Regards
Linnea
E- linneajones.mil@gmail.com

Active Member

Posts

Joined
Mon Sep 09, 2019 4:16 pm

Post by deepvyas » Wed Sep 29, 2021 5:36 pm

Hi ,
I can help you fix error message on checkout page.
Please connect further and share staging domain been setup.
eMail - deepvyas71@gmail.com


Regards
Deep

Expert Opencart Developer & Designer | S: deepvyas71 | E: deepvyas71@gmail.com


Active Member

Posts

Joined
Thu Jan 12, 2017 7:04 pm
Who is online

Users browsing this forum: alanjones, paulfeakins and 69 guests