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 
9 ?>
10 <?php ?>
11 <?php $parentItem = $block->getItem() ?>
12 
13 <?php $items = $block->getChildren($parentItem) ?>
14 <?php $_order = $block->getItem()->getOrderItem()->getOrder() ?>
15 <?php $_index = 0 ?>
16 
17 <?php $_prevOptionId = '' ?>
18 
19 <?php foreach ($items as $_item): ?>
20 
21  <?php if ($block->getItemOptions() || $parentItem->getDescription() || $this->helper('Magento\GiftMessage\Helper\Message')->isMessagesAllowed('order_item', $parentItem) && $parentItem->getGiftMessageId()): ?>
22  <?php $_showlastRow = true ?>
23  <?php else: ?>
24  <?php $_showlastRow = false ?>
25  <?php endif; ?>
26 
27  <?php if ($_item->getOrderItem()->getParentItem()): ?>
28  <?php $attributes = $block->getSelectionAttributes($_item) ?>
29  <?php if ($_prevOptionId != $attributes['option_id']): ?>
30  <tr class="options-label">
31  <td class="col label" colspan="7"><div class="option label"><?= /* @escapeNotVerified */ $attributes['option_label'] ?></div></td>
32  </tr>
33  <?php $_prevOptionId = $attributes['option_id'] ?>
34  <?php endif; ?>
35  <?php endif; ?>
36 <tr id="order-item-row-<?= /* @escapeNotVerified */ $_item->getId() ?>" class="<?php if ($_item->getOrderItem()->getParentItem()): ?>item-options-container<?php else: ?>item-parent<?php endif; ?>"<?php if ($_item->getParentItem()): ?> data-th="<?= /* @escapeNotVerified */ $attributes['option_label'] ?>"<?php endif; ?>>
37  <?php if (!$_item->getOrderItem()->getParentItem()): ?>
38  <td class="col name" data-th="<?= $block->escapeHtml(__('Product Name')) ?>">
39  <strong class="product name product-item-name"><?= $block->escapeHtml($_item->getName()) ?></strong>
40  </td>
41  <?php else: ?>
42  <td class="col value" data-th="<?= $block->escapeHtml(__('Product Name')) ?>"><?= $block->getValueHtml($_item) ?></td>
43  <?php endif; ?>
44  <td class="col sku" data-th="<?= $block->escapeHtml(__('SKU')) ?>"><?= $block->escapeHtml($_item->getSku()) ?></td>
45  <td class="col price" data-th="<?= $block->escapeHtml(__('Price')) ?>">
46  <?php if ($block->canShowPriceInfo($_item)): ?>
47  <?= $block->getItemPriceHtml($_item) ?>
48  <?php else: ?>
49  &nbsp;
50  <?php endif; ?>
51  </td>
52  <td class="col qty" data-th="<?= $block->escapeHtml(__('Quantity')) ?>">
53  <?php if ($block->canShowPriceInfo($_item)): ?>
54  <?= /* @escapeNotVerified */ $_item->getQty()*1 ?>
55  <?php else: ?>
56  &nbsp;
57  <?php endif; ?>
58  </td>
59  <td class="col subtotal" data-th="<?= $block->escapeHtml(__('Subtotal')) ?>">
60  <?php if ($block->canShowPriceInfo($_item)): ?>
61  <?= $block->getItemRowTotalHtml($_item) ?>
62  <?php else: ?>
63  &nbsp;
64  <?php endif; ?>
65  </td>
66  <td class="col discount" data-th="<?= $block->escapeHtml(__('Discount Amount')) ?>">
67  <?php if ($block->canShowPriceInfo($_item)): ?>
68  <?= /* @escapeNotVerified */ $block->getOrder()->formatPrice(-$_item->getDiscountAmount()) ?>
69  <?php else: ?>
70  &nbsp;
71  <?php endif; ?>
72  </td>
73  <td class="col rowtotal" data-th="<?= $block->escapeHtml(__('Row Total')) ?>">
74  <?php if ($block->canShowPriceInfo($_item)): ?>
75  <?= $block->getItemRowTotalAfterDiscountHtml($_item) ?>
76  <?php else: ?>
77  &nbsp;
78  <?php endif; ?>
79  </td>
80 </tr>
81 <?php endforeach; ?>
82 
83 <?php if ($_showlastRow && (($_options = $block->getItemOptions()) || $block->escapeHtml($_item->getDescription()))): ?>
84  <tr>
85  <td class="col options" colspan="7">
86  <?php if ($_options = $block->getItemOptions()): ?>
87  <dl class="item-options">
88  <?php foreach ($_options as $_option) : ?>
89  <dt><?= $block->escapeHtml($_option['label']) ?></dt>
90  <?php if (!$block->getPrintStatus()): ?>
91  <?php $_formatedOptionValue = $block->getFormatedOptionValue($_option) ?>
92  <dd<?php if (isset($_formatedOptionValue['full_view'])): ?> class="tooltip wrapper"<?php endif; ?>>
93  <?= /* @escapeNotVerified */ $_formatedOptionValue['value'] ?>
94  <?php if (isset($_formatedOptionValue['full_view'])): ?>
95  <div class="tooltip content">
96  <dl class="item options">
97  <dt><?= $block->escapeHtml($_option['label']) ?></dt>
98  <dd><?= /* @escapeNotVerified */ $_formatedOptionValue['full_view'] ?></dd>
99  </dl>
100  </div>
101  <?php endif; ?>
102  </dd>
103  <?php else: ?>
104  <dd><?= $block->escapeHtml((isset($_option['print_value']) ? $_option['print_value'] : $_option['value'])) ?></dd>
105  <?php endif; ?>
106  <?php endforeach; ?>
107  </dl>
108  <?php endif; ?>
109  <?= $block->escapeHtml($_item->getDescription()) ?>
110  </td>
111  </tr>
112 <?php endif; ?>
$_option
Definition: checkbox.phtml:11
</td ></tr > $_prevOptionId endif
Definition: renderer.phtml:46
$_item $items
Definition: renderer.phtml:18
endforeach
Definition: renderer.phtml:175
$parentItem $_order
Definition: default.phtml:12
$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