if(!empty($code)){ // promotion with code
$this->checkFixedDiscountItems($cart, $lineItem); // 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');