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)
Main Page
Related Pages
+
Namespaces
Namespace List
+
Namespace Members
+
All
$
_
c
d
e
f
g
h
i
m
p
r
s
t
u
+
Functions
_
c
d
e
f
g
h
i
m
p
r
s
t
u
Variables
+
Data Structures
Data Structures
Data Structure Index
Class Hierarchy
+
Data Fields
+
All
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Variables
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Files
File List
+
Globals
+
All
$
(
_
a
b
c
d
e
f
g
h
i
j
m
n
o
p
q
r
s
t
u
v
w
+
Functions
_
c
d
e
f
g
m
o
r
s
t
v
+
Variables
$
(
_
a
b
c
d
e
f
g
h
i
j
m
n
o
p
q
r
s
t
u
v
w
Examples
•
All
Data Structures
Namespaces
Files
Functions
Variables
Pages
vendor
magento
module-sales
Block
Order
Email
Items
Order
DefaultOrder.php
Go to the documentation of this file.
1
<?php
6
namespace
Magento\Sales\Block\Order\Email\Items\Order
;
7
8
use
Magento\Sales\Model\Order\Item
as OrderItem;
9
17
class
DefaultOrder
extends
\Magento\Framework\View\Element\Template
18
{
24
public
function
getOrder
()
25
{
26
return
$this->getItem()->getOrder();
27
}
28
32
public
function
getItemOptions
()
33
{
34
$result
= [];
35
if
(
$options
= $this->getItem()->getProductOptions()) {
36
if
(isset(
$options
[
'options'
])) {
37
$result
= array_merge(
$result
,
$options
[
'options'
]);
38
}
39
if
(isset(
$options
[
'additional_options'
])) {
40
$result
= array_merge(
$result
,
$options
[
'additional_options'
]);
41
}
42
if
(isset(
$options
[
'attributes_info'
])) {
43
$result
= array_merge(
$result
,
$options
[
'attributes_info'
]);
44
}
45
}
46
47
return
$result
;
48
}
49
54
public
function
getValueHtml
(
$value
)
55
{
56
if
(is_array(
$value
)) {
57
return
sprintf(
58
'%d'
,
59
$value
[
'qty'
]
60
) .
' x '
. $this->
escapeHtml
(
61
$value
[
'title'
]
62
) .
" "
. $this->getItem()->getOrder()->formatPrice(
63
$value
[
'price'
]
64
);
65
}
else
{
66
return
$this->
escapeHtml
(
$value
);
67
}
68
}
69
74
public
function
getSku
(
$item
)
75
{
76
if
(
$item
->getProductOptionByCode(
'simple_sku'
)) {
77
return
$item
->getProductOptionByCode(
'simple_sku'
);
78
}
else
{
79
return
$item
->getSku();
80
}
81
}
82
88
public
function
getProductAdditionalInformationBlock
()
89
{
90
return
$this->
getLayout
()->getBlock(
'additional.product.info'
);
91
}
92
99
public
function
getItemPrice
(OrderItem
$item
)
100
{
101
$block
= $this->
getLayout
()->getBlock(
'item_price'
);
102
$block
->setItem($item);
103
return
$block
->toHtml();
104
}
105
}
Magento\Sales\Block\Order\Email\Items\Order\DefaultOrder\getValueHtml
getValueHtml($value)
Definition:
DefaultOrder.php:54
$result
$result
Definition:
product_configurable_not_available_rollback.php:26
Magento\Sales\Block\Order\Email\Items\Order\DefaultOrder\getItemPrice
getItemPrice(OrderItem $item)
Definition:
DefaultOrder.php:99
Magento\Sales\Block\Order\Email\Items\Order\DefaultOrder\getSku
getSku($item)
Definition:
DefaultOrder.php:74
$item
$item
Definition:
partial_invoice.php:27
Magento\Sales\Block\Order\Email\Items\Order
Definition:
DefaultOrder.php:6
$block
$block
Definition:
block.php:8
Magento\Framework\View\Element\AbstractBlock\escapeHtml
escapeHtml($data, $allowedTags=null)
Definition:
AbstractBlock.php:890
$value
$value
Definition:
gender.phtml:16
Magento\Sales\Block\Order\Email\Items\Order\DefaultOrder\getOrder
getOrder()
Definition:
DefaultOrder.php:24
Magento\Framework\View\Element\AbstractBlock\getLayout
getLayout()
Definition:
AbstractBlock.php:295
Magento\Sales\Model\Order\Item
Definition:
Item.php:25
Magento\Sales\Block\Order\Email\Items\Order\DefaultOrder
Definition:
DefaultOrder.php:17
Magento\Framework\View\Element\Template
Definition:
Template.php:32
Magento\Sales\Block\Order\Email\Items\Order\DefaultOrder\getProductAdditionalInformationBlock
getProductAdditionalInformationBlock()
Definition:
DefaultOrder.php:88
Magento\Sales\Block\Order\Email\Items\Order\DefaultOrder\getItemOptions
getItemOptions()
Definition:
DefaultOrder.php:32
$options
$options
Definition:
multiple_mixed_products.php:29