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