Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
default.phtml
Go to the documentation of this file.
1 <?php
7 // @codingStandardsIgnoreFile
8 
9 ?>
10 <?php ?>
11 
12 <?php $parentItem = $block->getItem() ?>
13 
14 <?php $items = array_merge([$parentItem->getOrderItem()], $parentItem->getOrderItem()->getChildrenItems()) ?>
15 <?php $shipItems = $block->getChildren($parentItem) ?>
16 
17 <?php if ($block->getItemOptions() || $parentItem->getDescription() || $this->helper('Magento\GiftMessage\Helper\Message')->isMessagesAllowed('order_item', $parentItem) && $parentItem->getGiftMessageId()): ?>
18  <?php $_showlastRow = true ?>
19 <?php else: ?>
20  <?php $_showlastRow = false ?>
21 <?php endif; ?>
22 
23 <?php $_prevOptionId = '' ?>
24 
25 <?php foreach ($items as $_item): ?>
26 
27  <?php if ($_item->getParentItem()): ?>
28  <?php $attributes = $block->getSelectionAttributes($_item) ?>
29  <?php if ($_prevOptionId != $attributes['option_id']): ?>
30  <tr class="bundle-option-label">
31  <td colspan="2">
32  <strong><em><?= /* @escapeNotVerified */ $attributes['option_label'] ?></em></strong>
33  </td>
34  </tr>
35  <?php $_prevOptionId = $attributes['option_id'] ?>
36  <?php endif; ?>
37  <?php endif; ?>
38  <?php if (!$_item->getParentItem()): ?>
39  <tr class="bundle-item bundle-parent">
40  <td class="item-info">
41  <p class="product-name"><?= $block->escapeHtml($_item->getName()) ?></p>
42  <p class="sku"><?= /* @escapeNotVerified */ __('SKU') ?>: <?= $block->escapeHtml($block->getSku($_item)) ?></p>
43  </td>
44  <?php else: ?>
45  <tr class="bundle-item bundle-option-value">
46  <td class="item-info">
47  <p><?= $block->getValueHtml($_item) ?></p>
48  </td>
49  <?php endif; ?>
50  <td class="item-qty">
51  <?php if (($block->isShipmentSeparately() && $_item->getParentItem()) || (!$block->isShipmentSeparately() && !$_item->getParentItem())): ?>
52  <?php if (isset($shipItems[$_item->getId()])): ?>
53  <?= /* @escapeNotVerified */ $shipItems[$_item->getId()]->getQty() * 1 ?>
54  <?php elseif ($_item->getIsVirtual()): ?>
55  <?= /* @escapeNotVerified */ __('N/A') ?>
56  <?php else: ?>
57  0
58  <?php endif; ?>
59  <?php else: ?>
60  &nbsp;
61  <?php endif; ?>
62  </td>
63  </tr>
64 
65 <?php endforeach; ?>
66 
67 <?php if ($_showlastRow): ?>
68  <tr>
69  <td colspan="2" class="item-extra">
70  <?php if ($block->getItemOptions()): ?>
71  <dl>
72  <?php foreach ($block->getItemOptions() as $option): ?>
73  <dt><strong><em><?= /* @escapeNotVerified */ $option['label'] ?></em></strong></dt>
74  <dd><?= /* @escapeNotVerified */ $option['value'] ?></dd>
75  <?php endforeach; ?>
76  </dl>
77  <?php endif; ?>
78  <?= $block->escapeHtml($_item->getDescription()) ?>
79  </td>
80  </tr>
81 <?php endif; ?>
$option
Definition: default.phtml:8
elseif(isset( $params[ 'redirect_parent']))
Definition: iframe.phtml:17
__()
Definition: __.php:13
$block
Definition: block.php:8
endforeach
Definition: default.phtml:72
$_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
if( $_item->getOrderItem() ->getParentItem())( $_item) ?><?php if( $_prevOptionId ! $_prevOptionId endif
Definition: default.phtml:41
$attributes
Definition: matrix.phtml:13
$_item $_order $parentItem $items
Definition: default.phtml:15