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-bundle
view
base
templates
product
price
final_price.phtml
Go to the documentation of this file.
1
<?php
7
// @codingStandardsIgnoreFile
8
9
?>
10
11
<?php
12
$idSuffix
=
$block
->getIdSuffix() ?
$block
->getIdSuffix() :
''
;
16
$finalPriceModel
=
$block
->getPrice();
17
$minimalPrice
=
$finalPriceModel
->getMinimalPrice();
18
$maximalPrice
=
$finalPriceModel
->getMaximalPrice();
21
$regularPriceModel
=
$block
->getPriceType(
'regular_price'
);
22
$maximalRegularPrice
=
$regularPriceModel
->getMaximalPrice();
23
$minimalRegularPrice
=
$regularPriceModel
->getMinimalPrice();
24
?>
25
<?php
if
(
$block
->getSaleableItem()->getPriceView()): ?>
26
<p
class
=
"minimal-price"
>
27
<?php
/* @escapeNotVerified */
echo
$block
->renderAmount(
$minimalPrice
, [
28
'display_label'
=>
__
(
'As low as'
),
29
'price_id'
=>
$block
->getPriceId(
'from-'
),
30
'include_container'
=> true
31
]); ?>
32
<?php
if
(
$minimalPrice
<
$minimalRegularPrice
): ?>
33
<span
class
=
"old-price"
>
34
<?php
/* @escapeNotVerified */
echo
$block
->renderAmount(
$minimalRegularPrice
, [
35
'display_label'
=>
__
(
'Regular Price'
),
36
'price_id'
=>
$block
->getPriceId(
'old-price-'
.
$idSuffix
),
37
'include_container'
=>
true
,
38
'skip_adjustments'
=> true
39
]); ?>
40
</span>
41
<?php
endif
?>
42
</p>
43
<?php
else
: ?>
44
<?php
if
(
$block
->showRangePrice()): ?>
45
<p
class
=
"price-from"
>
46
<?php
/* @escapeNotVerified */
echo
$block
->renderAmount(
$minimalPrice
, [
47
'display_label'
=>
__
(
'From'
),
48
'price_id'
=>
$block
->getPriceId(
'from-'
),
49
'price_type'
=>
'minPrice'
,
50
'include_container'
=> true
51
]); ?>
52
<?php
if
(
$minimalPrice
<
$minimalRegularPrice
): ?>
53
<span
class
=
"old-price"
>
54
<?php
/* @escapeNotVerified */
echo
$block
->renderAmount(
$minimalRegularPrice
, [
55
'display_label'
=>
__
(
'Regular Price'
),
56
'price_id'
=>
$block
->getPriceId(
'old-price-'
.
$idSuffix
),
57
'include_container'
=>
true
,
58
'skip_adjustments'
=> true
59
]); ?>
60
</span>
61
<?php
endif
?>
62
</p>
63
<p
class
=
"price-to"
>
64
<?php
/* @escapeNotVerified */
echo
$block
->renderAmount(
$maximalPrice
, [
65
'display_label'
=>
__
(
'To'
),
66
'price_id'
=>
$block
->getPriceId(
'to-'
),
67
'price_type'
=>
'maxPrice'
,
68
'include_container'
=> true
69
]); ?>
70
<?php
if
(
$maximalPrice
<
$maximalRegularPrice
): ?>
71
<span
class
=
"old-price"
>
72
<?php
/* @escapeNotVerified */
echo
$block
->renderAmount(
$maximalRegularPrice
, [
73
'display_label'
=>
__
(
'Regular Price'
),
74
'price_id'
=>
$block
->getPriceId(
'old-price-'
.
$idSuffix
),
75
'include_container'
=>
true
,
76
'skip_adjustments'
=> true
77
]); ?>
78
</span>
79
<?php
endif
?>
80
</p>
81
<?php
else
: ?>
82
<?php
/* @escapeNotVerified */
echo
$block
->renderAmount(
$minimalPrice
, [
83
'price_id'
=>
$block
->getPriceId(
'product-price-'
),
84
'include_container'
=> true
85
]); ?>
86
<?php
if
(
$minimalPrice
<
$minimalRegularPrice
): ?>
87
<span
class
=
"old-price"
>
88
<?php
/* @escapeNotVerified */
echo
$block
->renderAmount(
$minimalRegularPrice
, [
89
'display_label'
=>
__
(
'Regular Price'
),
90
'price_id'
=>
$block
->getPriceId(
'old-price-'
.
$idSuffix
),
91
'include_container'
=>
true
,
92
'skip_adjustments'
=> true
93
]); ?>
94
</span>
95
<?php
endif
?>
96
<?php
endif
?>
97
<?php
endif
?>
$finalPriceModel
$finalPriceModel
Definition:
final_price.phtml:16
$maximalPrice
$maximalPrice
Definition:
final_price.phtml:18
__
__()
Definition:
__.php:13
$block
$block
Definition:
block.php:8
endif
endif
Definition:
final_price.phtml:69
$minimalRegularPrice
$minimalRegularPrice
Definition:
final_price.phtml:23
$regularPriceModel
$regularPriceModel
Definition:
final_price.phtml:21
$idSuffix
$idSuffix
Definition:
final_price.phtml:12
$maximalRegularPrice
$maximalRegularPrice
Definition:
final_price.phtml:22
$minimalPrice
$minimalPrice
Definition:
final_price.phtml:17