-
Notifications
You must be signed in to change notification settings - Fork 970
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Original cart deliveries are changed in DeliveryProcessor #3664
Labels
Comments
We found the following existing issues which may help or are related to your topic:
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
PHP Version
8.2
Shopware Version
6.5.8.8
Expected behaviour
The original cart should not be changed in cart processors
Actual behaviour
Deliveries in the original cart are changed in DeliveryProcessor
How to reproduce
For example convert an existing order to a cart and run the processors:
$cart = $this->orderConverter->convertToCart($existingOrder, $context); $behavior = new CartBehavior($salesChannelContext->getPermissions()); $cart = $this->processor->process($cart, $salesChannelContext, $behavior);
The deliveries from the original cart should be cloned and not changed for the calculation of the new cart:
`
$deliveries = $original->getDeliveries();
$firstDelivery = $deliveries->first();
if ($firstDelivery === null) {
return;
}
`
The text was updated successfully, but these errors were encountered: