Пример #1
0
 /**
  * @param Product $saleableItem
  * @param float $quantity
  * @param CalculatorInterface $calculator
  * @param SaleableInterface $bundleProduct
  * @param ManagerInterface $eventManager
  * @param DiscountCalculator $discountCalculator
  */
 public function __construct(Product $saleableItem, $quantity, CalculatorInterface $calculator, SaleableInterface $bundleProduct, ManagerInterface $eventManager, DiscountCalculator $discountCalculator)
 {
     parent::__construct($saleableItem, $quantity, $calculator);
     $this->bundleProduct = $bundleProduct;
     $this->eventManager = $eventManager;
     $this->discountCalculator = $discountCalculator;
 }
Пример #2
0
 /**
  * @param Product $saleableItem
  * @param float $quantity
  * @param CalculatorInterface $calculator
  * @param \Magento\Framework\Pricing\PriceCurrencyInterface $priceCurrency
  * @param PriceModifierInterface $modifier
  * @param \Magento\Framework\Store\StoreManagerInterface $storeManager
  */
 public function __construct(Product $saleableItem, $quantity, CalculatorInterface $calculator, \Magento\Framework\Pricing\PriceCurrencyInterface $priceCurrency, PriceModifierInterface $modifier, \Magento\Framework\Store\StoreManagerInterface $storeManager)
 {
     $this->priceCurrency = $priceCurrency;
     $this->priceModifier = $modifier;
     $this->storeManager = $storeManager;
     parent::__construct($saleableItem, $quantity, $calculator, $priceCurrency);
 }
Пример #3
0
 /**
  * @param Product $saleableItem
  * @param float $quantity
  * @param Calculator $calculator
  * @param TimezoneInterface $dateTime
  * @param StoreManager $storeManager
  * @param Session $customerSession
  * @param RuleFactory $catalogRuleResourceFactory
  */
 public function __construct(Product $saleableItem, $quantity, Calculator $calculator, TimezoneInterface $dateTime, StoreManager $storeManager, Session $customerSession, RuleFactory $catalogRuleResourceFactory)
 {
     parent::__construct($saleableItem, $quantity, $calculator);
     $this->dateTime = $dateTime;
     $this->storeManager = $storeManager;
     $this->customerSession = $customerSession;
     $this->resourceRuleFactory = $catalogRuleResourceFactory;
 }
 /**
  * @param Product $saleableItem
  * @param float $quantity
  * @param CalculatorInterface $calculator
  * @param \Magento\Framework\Pricing\PriceCurrencyInterface $priceCurrency
  * @param SaleableInterface $bundleProduct
  * @param ManagerInterface $eventManager
  * @param DiscountCalculator $discountCalculator
  * @param bool $useRegularPrice
  * @param array $excludeAdjustment
  */
 public function __construct(Product $saleableItem, $quantity, CalculatorInterface $calculator, \Magento\Framework\Pricing\PriceCurrencyInterface $priceCurrency, SaleableInterface $bundleProduct, ManagerInterface $eventManager, DiscountCalculator $discountCalculator, $useRegularPrice = false, $excludeAdjustment = null)
 {
     parent::__construct($saleableItem, $quantity, $calculator, $priceCurrency);
     $this->bundleProduct = $bundleProduct;
     $this->eventManager = $eventManager;
     $this->discountCalculator = $discountCalculator;
     $this->useRegularPrice = $useRegularPrice;
     $this->selection = $saleableItem;
     $this->excludeAdjustment = $excludeAdjustment;
 }
Пример #5
0
 /**
  * @param Product $saleableItem
  * @param float $quantity
  * @param CalculatorInterface $calculator
  * @param Session $customerSession
  */
 public function __construct(Product $saleableItem, $quantity, CalculatorInterface $calculator, Session $customerSession)
 {
     $quantity = $quantity ?: 1;
     parent::__construct($saleableItem, $quantity, $calculator);
     $this->customerSession = $customerSession;
     if ($saleableItem->hasCustomerGroupId()) {
         $this->customerGroup = (int) $saleableItem->getCustomerGroupId();
     } else {
         $this->customerGroup = (int) $this->customerSession->getCustomerGroupId();
     }
 }
Пример #6
0
 /**
  * @param Product $saleableItem
  * @param float $quantity
  * @param CalculatorInterface $calculator
  * @param \Magento\Framework\Pricing\PriceCurrencyInterface $priceCurrency
  * @param Session $customerSession
  * @param GroupManagementInterface $groupManagement
  */
 public function __construct(Product $saleableItem, $quantity, CalculatorInterface $calculator, \Magento\Framework\Pricing\PriceCurrencyInterface $priceCurrency, Session $customerSession, GroupManagementInterface $groupManagement)
 {
     $quantity = $quantity ?: 1;
     parent::__construct($saleableItem, $quantity, $calculator, $priceCurrency);
     $this->customerSession = $customerSession;
     $this->groupManagement = $groupManagement;
     if ($saleableItem->hasCustomerGroupId()) {
         $this->customerGroup = (int) $saleableItem->getCustomerGroupId();
     } else {
         $this->customerGroup = (int) $this->customerSession->getCustomerGroupId();
     }
 }
Пример #7
0
 /**
  * @param \Magento\Framework\Pricing\SaleableInterface $saleableItem
  * @param float $quantity
  * @param \Magento\Framework\Pricing\Adjustment\CalculatorInterface $calculator
  * @param \Magento\Framework\Pricing\PriceCurrencyInterface $priceCurrency
  * @param PriceResolverInterface $priceResolver
  */
 public function __construct(\Magento\Framework\Pricing\SaleableInterface $saleableItem, $quantity, \Magento\Framework\Pricing\Adjustment\CalculatorInterface $calculator, \Magento\Framework\Pricing\PriceCurrencyInterface $priceCurrency, PriceResolverInterface $priceResolver)
 {
     parent::__construct($saleableItem, $quantity, $calculator, $priceCurrency);
     $this->priceResolver = $priceResolver;
 }
Пример #8
0
 /**
  * @param Product $saleableItem
  * @param float $quantity
  * @param CalculatorInterface $calculator
  * @param TimezoneInterface $localeDate
  */
 public function __construct(Product $saleableItem, $quantity, CalculatorInterface $calculator, TimezoneInterface $localeDate)
 {
     parent::__construct($saleableItem, $quantity, $calculator);
     $this->localeDate = $localeDate;
 }
 /**
  * @param SaleableInterface $saleableItem
  * @param float $quantity
  * @param CalculatorInterface $calculator
  * @param \Magento\Framework\Pricing\PriceCurrencyInterface $priceCurrency
  * @param array $excludeAdjustment
  */
 public function __construct(SaleableInterface $saleableItem, $quantity, CalculatorInterface $calculator, \Magento\Framework\Pricing\PriceCurrencyInterface $priceCurrency, $excludeAdjustment = null)
 {
     parent::__construct($saleableItem, $quantity, $calculator, $priceCurrency);
     $this->excludeAdjustment = $excludeAdjustment;
 }
Пример #10
0
 /**
  * @param Product $saleableItem
  * @param float $quantity
  * @param CalculatorInterface $calculator
  */
 public function __construct(Product $saleableItem, $quantity, CalculatorInterface $calculator)
 {
     parent::__construct($saleableItem, $quantity, $calculator);
     $this->basePrice = $this->priceInfo->getPrice(BasePrice::PRICE_CODE);
 }
Пример #11
0
 /**
  * @param Product $saleableItem
  * @param float $quantity
  * @param CalculatorInterface $calculator
  * @param \Magento\Framework\Pricing\PriceCurrencyInterface $priceCurrency
  * @param TimezoneInterface $localeDate
  */
 public function __construct(Product $saleableItem, $quantity, CalculatorInterface $calculator, \Magento\Framework\Pricing\PriceCurrencyInterface $priceCurrency, TimezoneInterface $localeDate)
 {
     parent::__construct($saleableItem, $quantity, $calculator, $priceCurrency);
     $this->localeDate = $localeDate;
 }
Пример #12
0
 /**
  * @param Product $saleableItem
  * @param float $quantity
  * @param CalculatorInterface $calculator
  * @param PriceModifierInterface $modifier
  * @param \Magento\Store\Model\StoreManagerInterface $storeManager
  */
 public function __construct(Product $saleableItem, $quantity, CalculatorInterface $calculator, PriceModifierInterface $modifier, \Magento\Store\Model\StoreManagerInterface $storeManager)
 {
     $this->priceModifier = $modifier;
     $this->storeManager = $storeManager;
     parent::__construct($saleableItem, $quantity, $calculator);
 }
Пример #13
0
 /**
  * @param Product $saleableItem
  * @param float $quantity
  * @param BundleCalculatorInterface $calculator
  * @param \Magento\Framework\Pricing\PriceCurrencyInterface $priceCurrency
  * @param BundleSelectionFactory $bundleSelectionFactory
  */
 public function __construct(Product $saleableItem, $quantity, BundleCalculatorInterface $calculator, \Magento\Framework\Pricing\PriceCurrencyInterface $priceCurrency, BundleSelectionFactory $bundleSelectionFactory)
 {
     $this->selectionFactory = $bundleSelectionFactory;
     parent::__construct($saleableItem, $quantity, $calculator, $priceCurrency);
     $this->product->setQty($this->quantity);
 }
Пример #14
0
 /**
  * @param Product $saleableItem
  * @param float $quantity
  * @param BundleCalculatorInterface $calculator
  * @param BundleSelectionFactory $bundleSelectionFactory
  */
 public function __construct(Product $saleableItem, $quantity, BundleCalculatorInterface $calculator, BundleSelectionFactory $bundleSelectionFactory)
 {
     $this->selectionFactory = $bundleSelectionFactory;
     parent::__construct($saleableItem, $quantity, $calculator);
     $this->product->setQty($this->quantity);
 }
Пример #15
0
 /**
  * @param Product $saleableItem
  * @param float $quantity
  * @param CalculatorInterface $calculator
  * @param Session $customerSession
  */
 public function __construct(Product $saleableItem, $quantity, CalculatorInterface $calculator, Session $customerSession)
 {
     parent::__construct($saleableItem, $quantity, $calculator);
     $this->customerSession = $customerSession;
 }
Пример #16
0
 /**
  * @param Product $saleableItem
  * @param float $quantity
  * @param CalculatorInterface $calculator
  * @param \Magento\Framework\Pricing\PriceCurrencyInterface $priceCurrency
  * @param Session $customerSession
  */
 public function __construct(Product $saleableItem, $quantity, CalculatorInterface $calculator, \Magento\Framework\Pricing\PriceCurrencyInterface $priceCurrency, Session $customerSession)
 {
     parent::__construct($saleableItem, $quantity, $calculator, $priceCurrency);
     $this->customerSession = $customerSession;
 }