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 
12 <?php $parentItem = $block->getItem() ?>
13 <?php $items = array_merge([$parentItem->getOrderItem()], $parentItem->getOrderItem()->getChildrenItems()) ?>
14 <?php $shipItems = $block->getChildren($parentItem) ?>
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->getParentItem()): ?>
28  <?php $attributes = $block->getSelectionAttributes($_item) ?>
29  <?php if ($_prevOptionId != $attributes['option_id']): ?>
30  <tr class="options-label">
31  <td colspan="3" class="col label"><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->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->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 qty" data-th="<?= $block->escapeHtml(__('Qty Shipped')) ?>">
46  <?php if (($block->isShipmentSeparately() && $_item->getParentItem()) || (!$block->isShipmentSeparately() && !$_item->getParentItem())): ?>
47  <?php if (isset($shipItems[$_item->getId()])): ?>
48  <?= /* @escapeNotVerified */ $shipItems[$_item->getId()]->getQty()*1 ?>
49  <?php elseif ($_item->getIsVirtual()): ?>
50  <?= /* @escapeNotVerified */ __('N/A') ?>
51  <?php else: ?>
52  0
53  <?php endif; ?>
54  <?php else: ?>
55  &nbsp;
56  <?php endif; ?>
57  </td>
58  </tr>
59 <?php endforeach; ?>
60 
61 <?php if ($_showlastRow && (($_options = $block->getItemOptions()) || $block->escapeHtml($_item->getDescription()))): ?>
62  <tr>
63  <td class="col options" colspan="3">
64  <?php if ($_options = $block->getItemOptions()): ?>
65  <dl class="item-options">
66  <?php foreach ($_options as $_option) : ?>
67  <dt><?= $block->escapeHtml($_option['label']) ?></dt>
68  <?php if (!$block->getPrintStatus()): ?>
69  <?php $_formatedOptionValue = $block->getFormatedOptionValue($_option) ?>
70  <dd<?php if (isset($_formatedOptionValue['full_view'])): ?> class="tooltip wrapper"<?php endif; ?>>
71  <?= /* @escapeNotVerified */ $_formatedOptionValue['value'] ?>
72  <?php if (isset($_formatedOptionValue['full_view'])): ?>
73  <div class="tooltip content">
74  <dl class="item options">
75  <dt><?= $block->escapeHtml($_option['label']) ?></dt>
76  <dd><?= /* @escapeNotVerified */ $_formatedOptionValue['full_view'] ?></dd>
77  </dl>
78  </div>
79  <?php endif; ?>
80  </dd>
81  <?php else: ?>
82  <dd><?= $block->escapeHtml((isset($_option['print_value']) ? $_option['print_value'] : $_option['value'])) ?></dd>
83  <?php endif; ?>
84  <?php endforeach; ?>
85  </dl>
86  <?php endif; ?>
87  <?= $block->escapeHtml($_item->getDescription()) ?>
88  </td>
89  </tr>
90 <?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