Exception thrown if cart contains several entries of the same item


Description

When adding the same product variant to a cart twice (as 2 cart lines), the order fails to be created correctly with the following exception:

Exception: System.InvalidOperationException
Message: Sequence contains more than one matching element

Solution

To resolve the issue, upgrade Sitecore XC instance to Sitecore XC 10.0.0 or later.