Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
items.phtml
Go to the documentation of this file.
1 <?php
7 // @codingStandardsIgnoreFile
8 
10 ?>
11 <div class="table-wrapper order-items">
12  <table class="data table table-order-items" id="my-orders-table" summary="<?= /* @escapeNotVerified */ __('Items Ordered') ?>">
13  <caption class="table-caption"><?= /* @escapeNotVerified */ __('Items Ordered') ?></caption>
14  <thead>
15  <?php if($block->isPagerDisplayed()): ?>
16  <tr>
17  <td colspan="5" data-block="order-items-pager-top" class="order-pager-wrapper order-pager-wrapper-top">
18  <?= $block->getPagerHtml() ?>
19  </td>
20  </tr>
21  <?php endif ?>
22  <tr>
23  <th class="col name"><?= /* @escapeNotVerified */ __('Product Name') ?></th>
24  <th class="col sku"><?= /* @escapeNotVerified */ __('SKU') ?></th>
25  <th class="col price"><?= /* @escapeNotVerified */ __('Price') ?></th>
26  <th class="col qty"><?= /* @escapeNotVerified */ __('Qty') ?></th>
27  <th class="col subtotal"><?= /* @escapeNotVerified */ __('Subtotal') ?></th>
28  </tr>
29  </thead>
30  <?php $items = $block->getItems(); ?>
31  <?php $giftMessage = ''?>
32  <?php foreach ($items as $item): ?>
33  <?php if ($item->getParentItem()) continue; ?>
34  <tbody>
35  <?= $block->getItemHtml($item) ?>
36  <?php if ($this->helper('Magento\GiftMessage\Helper\Message')->isMessagesAllowed('order_item', $item) && $item->getGiftMessageId()): ?>
37  <?php $giftMessage = $this->helper('Magento\GiftMessage\Helper\Message')->getGiftMessageForEntity($item); ?>
38  <tr>
39  <td class="col options" colspan="5">
40  <a href="#"
41  id="order-item-gift-message-link-<?= /* @escapeNotVerified */ $item->getId() ?>"
42  class="action show"
43  aria-controls="order-item-gift-message-<?= /* @escapeNotVerified */ $item->getId() ?>"
44  data-item-id="<?= /* @escapeNotVerified */ $item->getId() ?>">
45  <?= /* @escapeNotVerified */ __('Gift Message') ?>
46  </a>
47  <?php $giftMessage = $this->helper('Magento\GiftMessage\Helper\Message')->getGiftMessageForEntity($item); ?>
48  <div class="order-gift-message" id="order-item-gift-message-<?= /* @escapeNotVerified */ $item->getId() ?>" role="region" aria-expanded="false" tabindex="-1">
49  <a href="#"
50  title="<?= /* @escapeNotVerified */ __('Close') ?>"
51  aria-controls="order-item-gift-message-<?= /* @escapeNotVerified */ $item->getId() ?>"
52  data-item-id="<?= /* @escapeNotVerified */ $item->getId() ?>"
53  class="action close">
54  <?= /* @escapeNotVerified */ __('Close') ?>
55  </a>
56  <dl class="item-options">
57  <dt class="item-sender"><strong class="label"><?= /* @escapeNotVerified */ __('From') ?></strong><?= $block->escapeHtml($giftMessage->getSender()) ?></dt>
58  <dt class="item-recipient"><strong class="label"><?= /* @escapeNotVerified */ __('To') ?></strong><?= $block->escapeHtml($giftMessage->getRecipient()) ?></dt>
59  <dd class="item-message"><?= /* @escapeNotVerified */ $this->helper('Magento\GiftMessage\Helper\Message')->getEscapedGiftMessage($item) ?></dd>
60  </dl>
61  </div>
62  </td>
63  </tr>
64  <?php endif ?>
65  </tbody>
66  <?php endforeach; ?>
67  <tfoot>
68  <?php if($block->isPagerDisplayed()): ?>
69  <tr>
70  <td colspan="5" data-block="order-items-pager-bottom" class="order-pager-wrapper order-pager-wrapper-bottom">
71  <?= $block->getPagerHtml() ?>
72  </td>
73  </tr>
74  <?php endif ?>
75  <?= $block->getChildHtml('order_totals') ?>
76  </tfoot>
77  </table>
78 </div>
79 <?php if ($giftMessage): ?>
80 <script type="text/x-magento-init">
81  {
82  "a.action.show, a.action.close": {
83  "giftMessage": {}
84  }
85  }
86 </script>
87 <?php endif; ?>
$giftMessage
Definition: items.phtml:47
if( $block->getQuote() ->hasVirtualItems())( 'Other items in your order') ?></strong >< a hrefforeach( $block->getVirtualQuoteItems() as $_item)(__( 'Product Name')) ?>"><? endforeach
Definition: items.phtml:31
if( $block->isPagerDisplayed())() ?></td ></tr ><?php endif ?>< tr >< th class $items
Definition: items.phtml:30
__()
Definition: __.php:13
$block
Definition: block.php:8
if( $type=='related' &&$canItemsAddToCart)( 'Check items to add to the cart or') ?>< button type endif
Definition: items.phtml:169