Exception thrown, when user logs in during checkout.

Created on 5 October 2020, about 4 years ago
Updated 17 February 2023, almost 2 years ago

Problem/Motivation

When anonymous user logs in during the checkout, and the authenticated user has already a cart which should be combined, there is an exception thrown, because the cart used during checkout is deleted:

Update existing 'commerce_order' entity while changing the ID is not supported

Steps to reproduce

- Add something to your cart as authenticated user.
- Logout
- Add something to your cart as anonymous user.
- During checkout, login with the login pane in the checkout.
- Get the exception above.

Proposed resolution

We should check in CartUnifier::combineCarts if the "$other_cart" is currently requested for checkout and if yes, use that one as main_cart.

🐛 Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

🇩🇪Germany eyilmaz Berlin, Germany

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024