From 13cdab613dcf8a1dec7bd61e3d3bada1ff39c9b2 Mon Sep 17 00:00:00 2001 From: Christian Date: Tue, 24 Oct 2023 12:37:28 +0200 Subject: [PATCH] MOL-1235: Fix voucher recognition in bundles (#646) --- src/Service/Cart/Voucher/VoucherCartCollector.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Service/Cart/Voucher/VoucherCartCollector.php b/src/Service/Cart/Voucher/VoucherCartCollector.php index ddba643dc..2d7819a43 100644 --- a/src/Service/Cart/Voucher/VoucherCartCollector.php +++ b/src/Service/Cart/Voucher/VoucherCartCollector.php @@ -72,7 +72,7 @@ public function collect(CartDataCollection $data, Cart $original, SalesChannelCo $cartHasVoucher = false; if ($salesChannelHasVoucherMethod) { - foreach ($original->getLineItems() as $item) { + foreach ($original->getLineItems()->getFlat() as $item) { # get the final inherited voucher type of the product # this might even be from the parent $voucherType = $this->voucherService->getFinalVoucherType($item, $context);