// remove other discounts of the promotion that should be deleted
$this->
removeOtherDiscountsOfPromotion($cart,
$lineItem,
$event->
getSalesChannelContext());
$this->
removeCode($code,
$cart);
return;
} // the user wants to remove an automatic added
// promotions, so lets do this
if ($lineItem->
hasPayloadValue('promotionId'
)) { $promotionId =
(string) $lineItem->
getPayloadValue('promotionId'
);
$this->
blockPromotion($promotionId,
$cart);
} } /**
* @throws CartException
*/
private function checkFixedDiscountItems(Cart
$cart, LineItem
$lineItem): void
{ $lineItems =
$cart->
getLineItems()->
filterType(PromotionProcessor::LINE_ITEM_TYPE
);
if ($lineItems->
count() < 1
) { return;
}