Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
creditmemo.phtml
Go to the documentation of this file.
1 <?php
7 // @codingStandardsIgnoreFile
8 
9 ?>
10 <?php $_order = $block->getOrder() ?>
11 <?php $_creditmemo = $block->getCreditmemo() ?>
12 <?php if ($_creditmemo): ?>
13  <?php $_creditmemos = [$_creditmemo]; ?>
14 <?php else: ?>
15  <?php $_creditmemos = $_order->getCreditmemosCollection() ?>
16 <?php endif; ?>
17 <?php foreach ($_creditmemos as $_creditmemo): ?>
18 <div class="order-details-items creditmemo">
19  <div class="order-title">
20  <strong><?= /* @escapeNotVerified */ __('Refund #%1', $_creditmemo->getIncrementId()) ?></strong>
21  </div>
22  <div class="table-wrapper order-items-creditmemo">
23  <table class="data table table-order-items creditmemo" id="my-refund-table-<?= /* @escapeNotVerified */ $_creditmemo->getId() ?>">
24  <caption class="table-caption"><?= /* @escapeNotVerified */ __('Items Refunded') ?></caption>
25  <thead>
26  <tr>
27  <th class="col name"><?= /* @escapeNotVerified */ __('Product Name') ?></th>
28  <th class="col sku"><?= /* @escapeNotVerified */ __('SKU') ?></th>
29  <th class="col price"><?= /* @escapeNotVerified */ __('Price') ?></th>
30  <th class="col qty"><?= /* @escapeNotVerified */ __('Qty') ?></th>
31  <th class="col subtotal"><?= /* @escapeNotVerified */ __('Subtotal') ?></th>
32  <th class="col discount"><?= /* @escapeNotVerified */ __('Discount Amount') ?></th>
33  <th class="col rowtotal"><?= /* @escapeNotVerified */ __('Row Total') ?></th>
34  </tr>
35  </thead>
36  <?php $_items = $_creditmemo->getAllItems(); ?>
37  <?php foreach ($_items as $_item): ?>
38  <?php if (!$_item->getOrderItem()->getParentItem()): ?>
39  <tbody>
40  <?= $block->getItemHtml($_item) ?>
41  </tbody>
42  <?php endif; ?>
43  <?php endforeach; ?>
44  <tfoot>
45  <?= $block->getTotalsHtml($_creditmemo) ?>
46  </tfoot>
47  </table>
48  </div>
49  <div class="block block-order-details-view">
50  <div class="block-title">
51  <strong><?= /* @escapeNotVerified */ __('Order Information') ?></strong>
52  </div>
53  <div class="block-content">
54  <?php if (!$_order->getIsVirtual()): ?>
55  <div class="box box-order-shipping-address">
56  <div class="box-title">
57  <strong><?= /* @escapeNotVerified */ __('Shipping Address') ?></strong>
58  </div>
59  <div class="box-content">
60  <?php $_shipping = $_creditmemo->getShippingAddress() ?>
61  <address><?= /* @escapeNotVerified */ $block->formatAddress($_shipping, 'html') ?></address>
62  </div>
63  </div>
64  <div class="box box-order-shipping-method">
65  <div class="box-title">
66  <strong><?= /* @escapeNotVerified */ __('Shipping Method') ?></strong>
67  </div>
68  <div class="box-content">
69  <?= $block->escapeHtml($_order->getShippingDescription()) ?>
70  </div>
71  </div>
72  <?php endif; ?>
73  <div class="box box-order-billing-address">
74  <div class="box-title">
75  <strong><?= /* @escapeNotVerified */ __('Billing Address') ?></strong>
76  </div>
77  <div class="box-content">
78  <?php $_billing = $_creditmemo->getbillingAddress() ?>
79  <address><?= /* @escapeNotVerified */ $block->formatAddress($_order->getBillingAddress(), 'html') ?></address>
80  </div>
81  </div>
82  <div class="box box-order-billing-method">
83  <div class="box-title">
84  <strong><?= /* @escapeNotVerified */ __('Payment Method') ?></strong>
85  </div>
86  <div class="box-content">
87  <?= $block->getPaymentInfoHtml() ?>
88  </div>
89  </div>
90  </div>
91  </div>
92 </div>
93 <?php endforeach; ?>
$parentItem $_order
Definition: default.phtml:12
__()
Definition: __.php:13
$block
Definition: block.php:8
$_item
Definition: default.phtml:11