Post by MattLG » Wed Jan 26, 2022 3:49 am

I've raised a PR to fix a race condition that I've found in the checkout: https://github.com/opencart/opencart/pull/10386

The payment_address call is happening simultaneously with the shipping_method or payment_method AJAX call. So on the server side loads the session before the shipping_method/payment_method calls have updated it. If the payment_address call then completes AFTER the shipping_method/payment_method, the session is resaved without the shipping methods and payment methods, therefore preventing customers from proceeding through the checkout.

This is a critical bug and it looks like this bug has been here for a LONG time. I've seen a few other reports on the forum that looks like this bug, but the issue never appeared to get resolved, and I guess the users just gave up and chose another platform. I get the feeling this affects a small number of stores a lot, whilst others are so infrequent that it is unnoticed. We're using a LOT of plugins on our site, which has probably affected the performance in just the right way for this issue to happen a lot.

I think this issue is critical enough to justify a new patch release even on its own.

Matt LG

Newbie

Posts

Joined
Wed Jan 26, 2022 3:39 am

Post by straightlight » Mon Jan 31, 2022 12:00 am

OC version. Posted in the Bug Reports section.

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 MattLG » Mon Feb 07, 2022 3:02 am

Sorry, I thought it was obvious from the PR. It's version 3. Looks like it's been there since 3.0.0.

Newbie

Posts

Joined
Wed Jan 26, 2022 3:39 am

Post by MattLG » Sat Mar 05, 2022 3:27 am

Is there anything else I should be doing to get this PR approved?

Newbie

Posts

Joined
Wed Jan 26, 2022 3:39 am

Post by straightlight » Sat Mar 05, 2022 6:11 am

You've address a commit about an ongoing issue you experienced. The commit is still opened.

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 ADD Creative » Sun Mar 06, 2022 9:03 pm

Your commit breaks the checkout a little but. Once registered, the step 2 Billing Details tab doesn't get updated.

There are quite a few bugs caused by race conditions. A more general solution is probably needed for the 3.x branch.
https://github.com/opencart/opencart/issues/7375
https://github.com/opencart/opencart/issues/9630
https://github.com/opencart/opencart/issues/7968

Sadly I can't see that ever happening. Possibly doesn't affect the master as that chaines the AJAX calls.

www.add-creative.co.uk


Expert Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom
Who is online

Users browsing this forum: No registered users and 7 guests