Magento 2 Documentation
2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
|
Public Member Functions | |
__construct (Product $saleableItem, $quantity, CalculatorInterface $calculator, \Magento\Framework\Pricing\PriceCurrencyInterface $priceCurrency, Session $customerSession, GroupManagementInterface $groupManagement, CustomerGroupRetrieverInterface $customerGroupRetriever=null) | |
getValue () | |
getTierPriceCount () | |
getTierPriceList () | |
getSavePercent (AmountInterface $amount) | |
isPercentageDiscount () | |
![]() | |
__construct (SaleableInterface $saleableItem, $quantity, CalculatorInterface $calculator, \Magento\Framework\Pricing\PriceCurrencyInterface $priceCurrency) | |
getValue () | |
getAmount () | |
getCustomAmount ($amount=null, $exclude=null, $context=[]) | |
getPriceCode () | |
getProduct () | |
getQuantity () | |
Data Fields | |
const | PRICE_CODE = 'tier_price' |
![]() | |
const | PRICE_CODE = 'abstract_price' |
Protected Member Functions | |
isFirstPriceBetter ($firstPrice, $secondPrice) | |
filterTierPrices (array $priceList) | |
applyAdjustment ($price) | |
canApplyTierPrice (array $currentTierPrice, $prevPriceGroup, $prevQty) | |
Protected Attributes | |
$customerSession | |
$customerGroup | |
$rawPriceList | |
$priceList | |
$groupManagement | |
![]() | |
$amount | |
$calculator | |
$product | |
$priceType | |
$quantity | |
$priceInfo | |
$value | |
$priceCurrency | |
__construct | ( | Product | $saleableItem, |
$quantity, | |||
CalculatorInterface | $calculator, | ||
\Magento\Framework\Pricing\PriceCurrencyInterface | $priceCurrency, | ||
Session | $customerSession, | ||
GroupManagementInterface | $groupManagement, | ||
CustomerGroupRetrieverInterface | $customerGroupRetriever = null |
||
) |
Product | $saleableItem | |
float | $quantity | |
CalculatorInterface | $calculator | |
\Magento\Framework\Pricing\PriceCurrencyInterface | $priceCurrency | |
Session | $customerSession | |
GroupManagementInterface | $groupManagement | |
CustomerGroupRetrieverInterface | null | $customerGroupRetriever |
Definition at line 74 of file TierPrice.php.
|
protected |
float | string | $price |
Definition at line 238 of file TierPrice.php.
|
protected |
Can apply tier price
array | $currentTierPrice | |
int | $prevPriceGroup | |
float | string | $prevQty |
Definition at line 251 of file TierPrice.php.
|
protected |
array | $priceList |
Definition at line 170 of file TierPrice.php.
getSavePercent | ( | AmountInterface | $amount | ) |
Calculates savings percentage according to the given tier price amount and related product price amount.
AmountInterface | $amount |
Definition at line 223 of file TierPrice.php.
getTierPriceCount | ( | ) |
Implements TierPriceInterface.
Definition at line 141 of file TierPrice.php.
getTierPriceList | ( | ) |
Implements TierPriceInterface.
Definition at line 149 of file TierPrice.php.
getValue | ( | ) |
Get price value
Implements PriceInterface.
Definition at line 101 of file TierPrice.php.
|
protected |
Returns true if first price is better
Method filters tiers price values, lower tier price value is better
float | $firstPrice | |
float | $secondPrice |
Definition at line 133 of file TierPrice.php.
isPercentageDiscount | ( | ) |
|
protected |
Definition at line 39 of file TierPrice.php.
|
protected |
Definition at line 34 of file TierPrice.php.
|
protected |
Definition at line 58 of file TierPrice.php.
|
protected |
Definition at line 53 of file TierPrice.php.
|
protected |
Definition at line 46 of file TierPrice.php.
const PRICE_CODE = 'tier_price' |
Price type tier
Definition at line 28 of file TierPrice.php.