Ejemplo n.º 1
0
 /**
  * @param PromotionInterface $promotion
  * @param int $discount
  * @param array $configuration
  * @param PromotionRuleInterface $rule
  */
 private function createFixedPromotion(PromotionInterface $promotion, $discount, array $configuration = [], PromotionRuleInterface $rule = null)
 {
     $this->persistPromotion($promotion, $this->actionFactory->createFixedDiscount($discount), $configuration, $rule);
 }
Ejemplo n.º 2
0
 /**
  * @param PromotionInterface $promotion
  * @param int $discount
  * @param array $configuration
  * @param PromotionRuleInterface|null $rule
  * @param ChannelInterface|null $channel
  */
 private function createFixedPromotion(PromotionInterface $promotion, $discount, array $configuration = [], PromotionRuleInterface $rule = null, ChannelInterface $channel = null)
 {
     $channelCode = null !== $channel ? $channel->getCode() : $this->sharedStorage->get('channel')->getCode();
     $this->persistPromotion($promotion, $this->actionFactory->createFixedDiscount($discount, $channelCode), $configuration, $rule);
 }