/** * @param PromotionInterface $promotion * @param int $discount * @param array $configuration */ private function createUnitFixedPromotion(PromotionInterface $promotion, $discount, array $configuration = [], $rule = null) { $this->persistPromotion($promotion, $this->actionFactory->createUnitFixedDiscount($discount), $configuration, $rule); }
/** * @param PromotionInterface $promotion * @param int $discount * @param array $configuration * @param PromotionRuleInterface|null $rule */ private function createUnitFixedPromotion(PromotionInterface $promotion, $discount, array $configuration = [], PromotionRuleInterface $rule = null) { $channelCode = $this->sharedStorage->get('channel')->getCode(); $this->persistPromotion($promotion, $this->actionFactory->createUnitFixedDiscount($discount, $channelCode), [$channelCode => $configuration], $rule); }