Since upgrading to Magento 2.3.1 CE all one step checkout solutions I've tried seems to fail to show the checkout success page.
Instead of showing the success page they redirect to the cart page with an empty cart. The order is saved correctly with all the information in the backend.
Default Magento2 checkout seems to work without issues.
I've tried at least 4 different one step checkout solutions and they all exhibit the same behaviour.
With xdebug I was able to stop execution and see that the checkout session data is empty by the time it reaches the success controller so the Checkout SuccessValidator fails and it redirects to the cart because it cannot find a lastSuccessOrderId.
I can see that during placeOrder it sets the lastSuccessOrderId correctly to the saved order but at some point afterwards it's reset for some reason.
There isn't a single error in the php error logs that could point to the issue. It seems to me that the checkout session is reinitialized in the wrong time before the success page is shown.
There's also no error response in the network inspector. It seems that everything is working so it's a logical error somewhere in the checkout workflow.
It's happened to me with 3 different themes and 4 different one step checkout modules so I can't determine a single culprit for this.
Could someone offer some advice on how to track this down? Even where I should put the breakpoint next to step through the code would help because due to the checkout's nature being ajax driven it's very hard to find the correct order of actions taken for a complete checkout.
I appreciate the help
PS: only guest checkout is affected
Sure, it's currently happening with bank transfer, check / money order and cash on delivery. Same behaviour with all 3.
hello @iowebgr
can you please check var/exception.log file of magento root directory for the error.
Last exceptions were 6 days ago and it wasn't related to check out.That's why it's hard to troubleshoot. There are no apparent errors whatsoever in magento logs or php logs and while checking out no errors appear.
Just informational messages regarding template block layout instructions in the cart page after the system has redirected the user to it from the success page.
Hi iowebgr
I also have the same problem. Did you solve that? If so? Can you please share in the blog?
One day it stopped happening on one site while amasty was investigating the issue without actually making any changes to the files.
And in the second site I kept trying different onestep checkout modules until I found one that was actually working. On 4th attempt I found one that was OK.
The creators of the modules couldn't fix the issues on each of the checkout modules after months of struggling through support so I went with this drastic approach.
To be honest the person who designed the checkout process for magento 2 should be fired imho. The Magento 2 checkout is so overly complex that it's incredibly hard to troubleshoot.
Hi iowebgr
Thank you for the information. I also have Amasty's OneStepCheckout module and yes you are right, the checkout areas of Magento 2 are incredibly complicated. I checked and changed a lot of data, but the result is always the same.
do you have a suggestion?
I'm assuming you also upgraded from 2.3.0 to 2.3.1?
We also have this issue with Amasty / Stripe. The checkout redirects every now and then to an empty shopping cart, but the order hs been completed successfully. Upgrade to magento 2.3.2 but still the issue remains.