checkFixedDiscountItems example

if ($event->getLineItem()->getType() !== PromotionProcessor::LINE_ITEM_TYPE) {
            return;
        }

        $lineItem = $event->getLineItem();

        $code = $lineItem->getReferencedId();

        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');
            
Home | Imprint | This part of the site doesn't use cookies.