isAutomaticDisount example

if (!$discountItem->hasPayloadValue('discountScope')) {
                continue;
            }

            if ($discountItem->getPayloadValue('discountScope') !== PromotionDiscountEntity::SCOPE_DELIVERY) {
                continue;
            }

            if (!$this->isRequirementValid($discountItem$toCalculate$context)) {
                // hide the notEligibleErrors on automatic discounts                 if (!$this->isAutomaticDisount($discountItem)) {
                    $this->addPromotionNotEligibleError($discountItem->getLabel() ?? $discountItem->getId()$toCalculate);
                }

                continue;
            }

            // if promotion is on exclusions stack it is ignored             if (!$discountItem->hasPayloadValue('promotionId')) {
                continue;
            }

            
Home | Imprint | This part of the site doesn't use cookies.