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 <?php $_item = $block->getItem() ?>
12 <?php $_order = $block->getOrder() ?>
13 
14 <?php $parentItem = $block->getItem() ?>
15 <?php $items = array_merge([$parentItem], $parentItem->getChildrenItems()); ?>
16 
17 <?php if ($block->getItemOptions() || $_item->getDescription() || $this->helper('Magento\GiftMessage\Helper\Message')->isMessagesAllowed('order_item', $_item) && $_item->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="3">
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  <td class="item-qty">
45  <?= /* @escapeNotVerified */ $_item->getQtyOrdered() * 1 ?>
46  </td>
47  <td class="item-price">
48  <?= /* @escapeNotVerified */ $block->getItemPrice($_item) ?>
49  </td>
50  </tr>
51  <?php else: ?>
52  <tr class="bundle-item bundle-option-value">
53  <td class="item-info" colspan="3">
54  <p><?= $block->getValueHtml($_item) ?></p>
55  </td>
56  </tr>
57  <?php endif; ?>
58 
59 <?php endforeach; ?>
60 
61 <?php if ($_showlastRow): ?>
62  <tr>
63  <td colspan="3" class="item-extra">
64  <?php if ($block->getItemOptions()): ?>
65  <dl>
66  <?php foreach ($block->getItemOptions() as $option): ?>
67  <dt><strong><em><?= /* @escapeNotVerified */ $option['label'] ?></em></strong></dt>
68  <dd><?= /* @escapeNotVerified */ $option['value'] ?></dd>
69  <?php endforeach; ?>
70  </dl>
71  <?php endif; ?>
72  <?php if ($_item->getGiftMessageId() && $_giftMessage = $this->helper('Magento\GiftMessage\Helper\Message')->getGiftMessage($_item->getGiftMessageId())): ?>
73  <table class="message-gift">
74  <tr>
75  <td>
76  <h3><?= /* @escapeNotVerified */ __('Gift Message') ?></h3>
77  <strong><?= /* @escapeNotVerified */ __('From:') ?></strong> <?= $block->escapeHtml($_giftMessage->getSender()) ?>
78  <br /><strong><?= /* @escapeNotVerified */ __('To:') ?></strong> <?= $block->escapeHtml($_giftMessage->getRecipient()) ?>
79  <br /><strong><?= /* @escapeNotVerified */ __('Message:') ?></strong>
80  <br /><?= $block->escapeHtml($_giftMessage->getMessage()) ?>
81  </td>
82  </tr>
83  </table>
84  <?php endif; ?>
85  </td>
86  </tr>
87 <?php endif; ?>
$option
Definition: default.phtml:8
$parentItem $_order
Definition: default.phtml:12
__()
Definition: __.php:13
$block
Definition: block.php:8
endforeach
Definition: default.phtml:72
$_item
Definition: default.phtml:11
if( $_item->getOrderItem() ->getParentItem())( $_item) ?><?php if( $_prevOptionId ! $_prevOptionId endif
Definition: default.phtml:41
$attributes
Definition: matrix.phtml:13
$_giftMessage
Definition: inline.phtml:10
$_item $_order $parentItem $items
Definition: default.phtml:15