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-checkout
Block
Shipping
Price.php
Go to the documentation of this file.
1
<?php
6
namespace
Magento\Checkout\Block\Shipping
;
7
8
use
Magento\Checkout\Block\Cart\AbstractCart
;
9
use
Magento\Framework\Pricing\PriceCurrencyInterface
;
10
use
Magento\Quote\Model\Quote\Address\Rate
;
11
16
class
Price
extends
AbstractCart
17
{
21
protected
$shippingRate
;
22
26
protected
$priceCurrency
;
27
35
public
function
__construct
(
36
\
Magento
\Framework\View\Element\
Template
\
Context
$context,
37
\
Magento
\Customer\Model\Session $customerSession,
38
\
Magento
\Checkout\Model\Session $checkoutSession,
39
PriceCurrencyInterface
$priceCurrency
,
40
array
$data
= []
41
) {
42
$this->priceCurrency =
$priceCurrency
;
43
parent::__construct($context, $customerSession, $checkoutSession,
$data
);
44
}
45
52
public
function
setShippingRate
(
Rate
$shippingRate
)
53
{
54
$this->shippingRate =
$shippingRate
;
55
return
$this;
56
}
57
63
public
function
getShippingRate
()
64
{
65
return
$this->shippingRate
;
66
}
67
73
public
function
getShippingPrice
()
74
{
75
return
$this->priceCurrency->convertAndFormat($this->shippingRate->getPrice());
76
}
77
}
Magento\Checkout\Block\Shipping\Price\setShippingRate
setShippingRate(Rate $shippingRate)
Definition:
Price.php:52
Magento\Checkout\Block\Shipping\Price\getShippingPrice
getShippingPrice()
Definition:
Price.php:73
Magento\Checkout\Block\Shipping\Price\getShippingRate
getShippingRate()
Definition:
Price.php:63
Magento\Checkout\Block\Shipping
Definition:
Price.php:6
Magento\Quote\Model\Quote\Address\Rate
Definition:
Rate.php:38
Magento\Checkout\Block\Shipping\Price\__construct
__construct(\Magento\Framework\View\Element\Template\Context $context, \Magento\Customer\Model\Session $customerSession, \Magento\Checkout\Model\Session $checkoutSession, PriceCurrencyInterface $priceCurrency, array $data=[])
Definition:
Price.php:35
Magento\Checkout\Block\Cart\AbstractCart
Definition:
AbstractCart.php:13
Magento\Framework\View\Element\Template\Context
Definition:
Context.php:23
$data
$data
Definition:
attribute_set_with_image_attribute.php:16
Magento\Framework\Pricing\PriceCurrencyInterface
Definition:
PriceCurrencyInterface.php:15
Magento\Checkout\Block\Shipping\Price
Definition:
Price.php:16
Magento
Magento\Checkout\Block\Shipping\Price\$shippingRate
$shippingRate
Definition:
Price.php:21
Magento\Checkout\Block\Shipping\Price\$priceCurrency
$priceCurrency
Definition:
Price.php:26
Magento\Framework\View\Element\Template
Definition:
Template.php:32