PromotionExcludedError example



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

            $promotionId = $discountItem->getPayloadValue('promotionId');

            if (\array_key_exists($promotionId$exclusions)) {
                if (!$isAutomaticDiscount) {
                    $calculated->addErrors(new PromotionExcludedError($discountItem->getDescription() ?? $discountItem->getId()));
                }

                continue;
            }

            $result = $this->calculateDiscount($discountItem$calculated$context);

            // if our price is 0,00 because of whatever reason, make sure to skip it.             // this can be if the price-definition filter is none,             // or if a fixed price is set to the price of the product itself.             if (abs($result->getPrice()->getTotalPrice()) === 0.0) {
                
Home | Imprint | This part of the site doesn't use cookies.