Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
renderer.phtml
Go to the documentation of this file.
1 <?php
7 // @codingStandardsIgnoreFile
8 
10 ?>
11 <?php $parentItem = $block->getItem() ?>
12 <?php $items = array_merge([$parentItem], $parentItem->getChildrenItems()); ?>
13 <?php $_index = 0 ?>
14 
15 <?php $_prevOptionId = '' ?>
16 
17 <?php foreach ($items as $_item): ?>
18 
19  <?php if ($block->getItemOptions() || $parentItem->getDescription() || $this->helper('Magento\GiftMessage\Helper\Message')->isMessagesAllowed('order_item', $parentItem) && $parentItem->getGiftMessageId()): ?>
20  <?php $_showlastRow = true ?>
21  <?php else: ?>
22  <?php $_showlastRow = false ?>
23  <?php endif; ?>
24 
25  <?php if ($_item->getParentItem()): ?>
26  <?php $attributes = $block->getSelectionAttributes($_item) ?>
27  <?php if ($_prevOptionId != $attributes['option_id']): ?>
28  <tr class="options-label">
29  <td class="col label" colspan="5"><?= /* @escapeNotVerified */ $attributes['option_label'] ?></td>
30  </tr>
31  <?php $_prevOptionId = $attributes['option_id'] ?>
32  <?php endif; ?>
33  <?php endif; ?>
34 <tr id="order-item-row-<?= /* @escapeNotVerified */ $_item->getId() ?>" class="<?php if ($_item->getParentItem()): ?>item-options-container<?php else: ?>item-parent<?php endif; ?>"<?php if ($_item->getParentItem()): ?> data-th="<?= /* @escapeNotVerified */ $attributes['option_label'] ?>"<?php endif; ?>>
35  <?php if (!$_item->getParentItem()): ?>
36  <td class="col name" data-th="<?= $block->escapeHtml(__('Product Name')) ?>">
37  <strong class="product name product-item-name"><?= $block->escapeHtml($_item->getName()) ?></strong>
38  </td>
39  <?php else: ?>
40  <td class="col value" data-th="<?= $block->escapeHtml(__('Product Name')) ?>"><?= $block->getValueHtml($_item) ?></td>
41  <?php endif; ?>
42  <td class="col sku" data-th="<?= $block->escapeHtml(__('SKU')) ?>"><?= /* @escapeNotVerified */ $block->prepareSku($_item->getSku()) ?></td>
43  <td class="col price" data-th="<?= $block->escapeHtml(__('Price')) ?>">
44  <?php if (!$_item->getParentItem()): ?>
45  <?= $block->getItemPriceHtml() ?>
46  <?php else: ?>
47  &nbsp;
48  <?php endif; ?>
49  </td>
50  <td class="col qty" data-th="<?= $block->escapeHtml(__('Quantity')) ?>">
51  <?php if (
52  ($_item->getParentItem() && $block->isChildCalculated()) ||
53  (!$_item->getParentItem() && !$block->isChildCalculated()) || ($_item->getQtyShipped() > 0 && $_item->getParentItem() && $block->isShipmentSeparately())):?>
54  <ul class="items-qty">
55  <?php endif; ?>
56  <?php if (($_item->getParentItem() && $block->isChildCalculated()) ||
57  (!$_item->getParentItem() && !$block->isChildCalculated())): ?>
58  <?php if ($_item->getQtyOrdered() > 0): ?>
59  <li class="item">
60  <span class="title"><?= /* @escapeNotVerified */ __('Ordered') ?></span>
61  <span class="content"><?= /* @escapeNotVerified */ $_item->getQtyOrdered()*1 ?></span>
62  </li>
63  <?php endif; ?>
64  <?php if ($_item->getQtyShipped() > 0 && !$block->isShipmentSeparately()): ?>
65  <li class="item">
66  <span class="title"><?= /* @escapeNotVerified */ __('Shipped') ?></span>
67  <span class="content"><?= /* @escapeNotVerified */ $_item->getQtyShipped()*1 ?></span>
68  </li>
69  <?php endif; ?>
70  <?php if ($_item->getQtyCanceled() > 0): ?>
71  <li class="item">
72  <span class="title"><?= /* @escapeNotVerified */ __('Canceled') ?></span>
73  <span class="content"><?= /* @escapeNotVerified */ $_item->getQtyCanceled()*1 ?></span>
74  </li>
75  <?php endif; ?>
76  <?php if ($_item->getQtyRefunded() > 0): ?>
77  <li class="item">
78  <span class="title"><?= /* @escapeNotVerified */ __('Refunded') ?></span>
79  <span class="content"><?= /* @escapeNotVerified */ $_item->getQtyRefunded()*1 ?></span>
80  </li>
81  <?php endif; ?>
82  <?php elseif ($_item->getQtyShipped() > 0 && $_item->getParentItem() && $block->isShipmentSeparately()): ?>
83  <li class="item">
84  <span class="title"><?= /* @escapeNotVerified */ __('Shipped') ?></span>
85  <span class="content"><?= /* @escapeNotVerified */ $_item->getQtyShipped()*1 ?></span>
86  </li>
87  <?php else: ?>
88  &nbsp;
89  <?php endif; ?>
90  <?php if (
91  ($_item->getParentItem() && $block->isChildCalculated()) ||
92  (!$_item->getParentItem() && !$block->isChildCalculated()) || ($_item->getQtyShipped() > 0 && $_item->getParentItem() && $block->isShipmentSeparately())):?>
93  </ul>
94  <?php endif; ?>
95  </td>
96  <td class="col subtotal" data-th="<?= $block->escapeHtml(__('Subtotal')) ?>">
97  <?php if (!$_item->getParentItem()): ?>
98  <?= $block->getItemRowTotalHtml() ?>
99  <?php else: ?>
100  &nbsp;
101  <?php endif; ?>
102  </td>
103 </tr>
104 <?php endforeach; ?>
105 
106 <?php if ($_showlastRow && (($_options = $block->getItemOptions()) || $block->escapeHtml($_item->getDescription()))): ?>
107 <tr>
108  <td class="col options" colspan="5">
109  <?php if ($_options = $block->getItemOptions()): ?>
110  <dl class="item-options">
111  <?php foreach ($_options as $_option) : ?>
112  <dt><?= $block->escapeHtml($_option['label']) ?></dt>
113  <?php if (!$block->getPrintStatus()): ?>
114  <?php $_formatedOptionValue = $block->getFormatedOptionValue($_option) ?>
115  <dd<?php if (isset($_formatedOptionValue['full_view'])): ?> class="tooltip wrapper"<?php endif; ?>>
116  <?= /* @escapeNotVerified */ $_formatedOptionValue['value'] ?>
117  <?php if (isset($_formatedOptionValue['full_view'])): ?>
118  <div class="tooltip content">
119  <dl class="item options">
120  <dt><?= $block->escapeHtml($_option['label']) ?></dt>
121  <dd><?= /* @escapeNotVerified */ $_formatedOptionValue['full_view'] ?></dd>
122  </dl>
123  </div>
124  <?php endif; ?>
125  </dd>
126  <?php else: ?>
127  <dd><?= $block->escapeHtml((isset($_option['print_value']) ? $_option['print_value'] : $_option['value'])) ?></dd>
128  <?php endif; ?>
129  <?php endforeach; ?>
130  </dl>
131  <?php endif; ?>
132  <?= $block->escapeHtml($_item->getDescription()) ?>
133  </td>
134 </tr>
135 <?php endif; ?>
$_option
Definition: checkbox.phtml:11
</td ></tr > $_prevOptionId endif
Definition: renderer.phtml:46
elseif(isset( $params[ 'redirect_parent']))
Definition: iframe.phtml:17
$_item $items
Definition: renderer.phtml:18
endforeach
Definition: renderer.phtml:175
__()
Definition: __.php:13
$block
Definition: block.php:8
$_count $_index $_prevOptionId if($block->getOrderOptions()|| $_item->getDescription()) foreach( $items as $_item)( $_item) ?><?php $attributes if( $_item->getOrderItem() ->getParentItem())($_prevOptionId !=$attributes['option_id'])</td >< td > & nbsp
Definition: renderer.phtml:33
$_item
Definition: default.phtml:11
$attributes
Definition: matrix.phtml:13