- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Order success page redirecting to cart after checkout
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