Magento Extensions Rating 2024
EXTENSIONS BY CATEGORY
B2B (Business-To-Business)
Blog
Customer
ERP (Enterprise Resource Planning)
Mega Menu
One Step Checkout
Order
POS (Point Of Sale)
Search
Shopping Cart
Sitemap
SEO
Social
Stock & Inventory Management
EXTENSIONS BY DEVELOPER
aheadWorks
Amasty
Boost My Shop
BSS Commerce
Magestore
MageWorx
Mirasvit
Templates Master
Wyomind
XTENTO
Magento 2 Documentation
Magento 2 Documentation
2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
vendor
magento
module-msrp
Pricing
Price
MsrpPrice.php
Go to the documentation of this file.
1
<?php
7
namespace
Magento\Msrp\Pricing\Price
;
8
9
use
Magento\Catalog\Model\Product
;
10
use
Magento\Catalog\Pricing\Price\FinalPrice
;
11
use
Magento\Framework\Pricing\Adjustment\CalculatorInterface
;
12
16
class
MsrpPrice
extends
FinalPrice
implements
MsrpPriceInterface
17
{
21
const
PRICE_CODE
=
'msrp_price'
;
22
26
protected
$msrpData
;
27
31
protected
$config
;
32
41
public
function
__construct
(
42
Product
$saleableItem,
43
$quantity
,
44
CalculatorInterface
$calculator
,
45
\
Magento
\Framework\Pricing\
PriceCurrencyInterface
$priceCurrency
,
46
\
Magento
\Msrp\Helper\Data
$msrpData
,
47
\
Magento
\Msrp\Model\
Config
$config
48
) {
49
parent::__construct($saleableItem,
$quantity
,
$calculator
,
$priceCurrency
);
50
$this->msrpData =
$msrpData
;
51
$this->config =
$config
;
52
}
53
59
public
function
isShowPriceOnGesture
()
60
{
61
return
$this->msrpData->isShowPriceOnGesture($this->product);
62
}
63
69
public
function
getMsrpPriceMessage
()
70
{
71
return
$this->msrpData->getMsrpPriceMessage($this->product);
72
}
73
79
public
function
isMsrpEnabled
()
80
{
81
return
$this->config->isEnabled();
82
}
83
90
public
function
canApplyMsrp
(
Product
$product
)
91
{
92
return
$this->msrpData->canApplyMsrp(
$product
);
93
}
94
99
public
function
isMinimalPriceLessMsrp
(
Product
$product
)
100
{
101
return
$this->msrpData->isMinimalPriceLessMsrp(
$product
);
102
}
103
}
Magento\Msrp\Pricing\Price\MsrpPrice\PRICE_CODE
const PRICE_CODE
Definition:
MsrpPrice.php:21
Magento\Msrp\Pricing\Price\MsrpPrice\isMsrpEnabled
isMsrpEnabled()
Definition:
MsrpPrice.php:79
Magento\Msrp\Pricing\Price\MsrpPrice\isMinimalPriceLessMsrp
isMinimalPriceLessMsrp(Product $product)
Definition:
MsrpPrice.php:99
Magento\Framework\Pricing\Price\AbstractPrice\$priceCurrency
$priceCurrency
Definition:
AbstractPrice.php:66
Magento\Msrp\Pricing\Price
Definition:
MsrpPrice.php:7
Magento\Msrp\Pricing\Price\MsrpPrice\$config
$config
Definition:
MsrpPrice.php:31
Magento\Msrp\Pricing\Price\MsrpPrice\canApplyMsrp
canApplyMsrp(Product $product)
Definition:
MsrpPrice.php:90
Magento\Framework\Pricing\PriceCurrencyInterface
Definition:
PriceCurrencyInterface.php:15
Magento\Catalog\Model\Product
Definition:
Product.php:42
Magento\Framework\Pricing\Adjustment\CalculatorInterface
Definition:
CalculatorInterface.php:17
Magento\Msrp\Pricing\Price\MsrpPrice\__construct
__construct(Product $saleableItem, $quantity, CalculatorInterface $calculator, \Magento\Framework\Pricing\PriceCurrencyInterface $priceCurrency, \Magento\Msrp\Helper\Data $msrpData, \Magento\Msrp\Model\Config $config)
Definition:
MsrpPrice.php:41
Magento\Catalog\Model\Product
Definition:
ActionTest.php:6
Magento\Msrp\Pricing\Price\MsrpPrice\getMsrpPriceMessage
getMsrpPriceMessage()
Definition:
MsrpPrice.php:69
Magento
Magento\Msrp\Pricing\Price\MsrpPrice\isShowPriceOnGesture
isShowPriceOnGesture()
Definition:
MsrpPrice.php:59
Magento\Framework\Pricing\Price\AbstractPrice\$quantity
$quantity
Definition:
AbstractPrice.php:51
Magento\Catalog\Pricing\Price\FinalPrice
Definition:
FinalPrice.php:15
Magento\Msrp\Pricing\Price\MsrpPriceInterface
Definition:
MsrpPriceInterface.php:17
Magento\Framework\App\ResourceConnection\Config
Definition:
Config.php:14
Magento\Framework\Pricing\Price\AbstractPrice\$product
$product
Definition:
AbstractPrice.php:41
Magento\Msrp\Pricing\Price\MsrpPrice
Definition:
MsrpPrice.php:16
Magento\Framework\Pricing\Price\AbstractPrice\$calculator
$calculator
Definition:
AbstractPrice.php:36
Magento\Msrp\Pricing\Price\MsrpPrice\$msrpData
$msrpData
Definition:
MsrpPrice.php:26