Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
info.phtml
Go to the documentation of this file.
1 <?php
11 // @codingStandardsIgnoreFile
12 
13 $order = $block->getOrder();
14 
15 $orderAdminDate = $block->formatDate(
16  $block->getOrderAdminDate($order->getCreatedAt()),
17  \IntlDateFormatter::MEDIUM,
18  true
19 );
20 
21 $orderStoreDate = $block->formatDate(
22  $order->getCreatedAt(),
23  \IntlDateFormatter::MEDIUM,
24  true,
25  $block->getTimezoneForStore($order->getStore())
26 );
27 
28 $customerUrl = $block->getCustomerViewUrl();
29 ?>
30 
31 <section class="admin__page-section order-view-account-information">
32  <div class="admin__page-section-title">
33  <span class="title"><?= $block->escapeHtml(__('Order & Account Information')) ?></span>
34  </div>
35  <div class="admin__page-section-content">
36  <div class="admin__page-section-item order-information">
37  <?php /* Order Information */ ?>
38  <?php $confirmationEmailStatusMessage = $order->getEmailSent() ? __('The order confirmation email was sent') : __('The order confirmation email is not sent'); ?>
39  <div class="admin__page-section-item-title">
40  <span class="title">
41  <?php if ($block->getNoUseOrderLink()): ?>
42  <?= $block->escapeHtml(__('Order # %1', $order->getRealOrderId())) ?> (<span><?= $block->escapeHtml($confirmationEmailStatusMessage) ?></span>)
43  <?php else: ?>
44  <a href="<?= $block->escapeHtml($block->getViewUrl($order->getId())) ?>"><?= $block->escapeHtml(__('Order # %1', $order->getRealOrderId())) ?></a>
45  <span>(<?= $block->escapeHtml($confirmationEmailStatusMessage) ?>)</span>
46  <?php endif; ?>
47  </span>
48  </div>
49  <div class="admin__page-section-item-content">
50  <table class="admin__table-secondary order-information-table">
51  <tr>
52  <th><?= $block->escapeHtml(__('Order Date')) ?></th>
53  <td><?= $block->escapeHtml($orderAdminDate) ?></td>
54  </tr>
55  <?php if ($orderAdminDate != $orderStoreDate):?>
56  <tr>
57  <th><?= $block->escapeHtml(__('Order Date (%1)', $block->getTimezoneForStore($order->getStore()))) ?></th>
58  <td><?= $block->escapeHtml($orderStoreDate) ?></td>
59  </tr>
60  <?php endif;?>
61  <tr>
62  <th><?= $block->escapeHtml(__('Order Status')) ?></th>
63  <td><span id="order_status"><?= $block->escapeHtml($order->getStatusLabel()) ?></span></td>
64  </tr>
65  <?= $block->getChildHtml() ?>
66  <?php if ($block->isSingleStoreMode() == false):?>
67  <tr>
68  <th><?= $block->escapeHtml(__('Purchased From')) ?></th>
69  <td><?= $block->escapeHtml($block->getOrderStoreName(), ['br']) ?></td>
70  </tr>
71  <?php endif; ?>
72  <?php if ($order->getRelationChildId()): ?>
73  <tr>
74  <th><?= $block->escapeHtml(__('Link to the New Order')) ?></th>
75  <td>
76  <a href="<?= $block->escapeHtml($block->getViewUrl($order->getRelationChildId())) ?>">
77  <?= $block->escapeHtml($order->getRelationChildRealId()) ?>
78  </a>
79  </td>
80  </tr>
81  <?php endif; ?>
82  <?php if ($order->getRelationParentId()): ?>
83  <tr>
84  <th><?= $block->escapeHtml(__('Link to the Previous Order')) ?></th>
85  <td>
86  <a href="<?= $block->escapeHtml($block->getViewUrl($order->getRelationParentId())) ?>">
87  <?= $block->escapeHtml($order->getRelationParentRealId()) ?>
88  </a>
89  </td>
90  </tr>
91  <?php endif; ?>
92  <?php if ($order->getRemoteIp() && $block->shouldDisplayCustomerIp()): ?>
93  <tr>
94  <th><?= $block->escapeHtml(__('Placed from IP')) ?></th>
95  <td><?= $block->escapeHtml($order->getRemoteIp()); echo $order->getXForwardedFor() ? ' (' . $block->escapeHtml($order->getXForwardedFor()) . ')' : ''; ?></td>
96  </tr>
97  <?php endif; ?>
98  <?php if ($order->getGlobalCurrencyCode() != $order->getBaseCurrencyCode()): ?>
99  <tr>
100  <th><?= $block->escapeHtml(__('%1 / %2 rate:', $order->getGlobalCurrencyCode(), $order->getBaseCurrencyCode())) ?></th>
101  <td><?= $block->escapeHtml($order->getBaseToGlobalRate()) ?></td>
102  </tr>
103  <?php endif; ?>
104  <?php if ($order->getBaseCurrencyCode() != $order->getOrderCurrencyCode()): ?>
105  <tr>
106  <th><?= $block->escapeHtml(__('%1 / %2 rate:', $order->getOrderCurrencyCode(), $order->getBaseCurrencyCode())) ?></th>
107  <th><?= $block->escapeHtml($order->getBaseToOrderRate()) ?></th>
108  </tr>
109  <?php endif; ?>
110  </table>
111  </div>
112  </div>
113 
114  <div class="admin__page-section-item order-account-information">
115  <?php /* Account Information */ ?>
116  <div class="admin__page-section-item-title">
117  <span class="title"><?= $block->escapeHtml(__('Account Information')) ?></span>
118  <div class="actions">
119  <?php if ($customerUrl) : ?>
120  <a href="<?= /* @noEscape */ $customerUrl ?>" target="_blank">
121  <?= $block->escapeHtml(__('Edit Customer')) ?>
122  </a>
123  <?php endif; ?>
124  </div>
125  </div>
126  <div class="admin__page-section-item-content">
127  <table class="admin__table-secondary order-account-information-table">
128  <tr>
129  <th><?= $block->escapeHtml(__('Customer Name')) ?></th>
130  <td>
131  <?php if ($customerUrl): ?>
132  <a href="<?= $block->escapeUrl($customerUrl) ?>" target="_blank">
133  <span><?= $block->escapeHtml($order->getCustomerName()) ?></span>
134  </a>
135  <?php else: ?>
136  <?= $block->escapeHtml($order->getCustomerName()) ?>
137  <?php endif; ?>
138  </td>
139  </tr>
140  <tr>
141  <th><?= $block->escapeHtml(__('Email')) ?></th>
142  <td><a href="mailto:<?php echo $block->escapeHtml($order->getCustomerEmail()) ?>"><?php echo $block->escapeHtml($order->getCustomerEmail()) ?></a></td>
143  </tr>
144  <?php if ($groupName = $block->getCustomerGroupName()) : ?>
145  <tr>
146  <th><?= $block->escapeHtml(__('Customer Group')) ?></th>
147  <td><?= $block->escapeHtml($groupName) ?></td>
148  </tr>
149  <?php endif; ?>
150  <?php foreach ($block->getCustomerAccountData() as $data):?>
151  <tr>
152  <th><?= $block->escapeHtml($data['label']) ?></th>
153  <td><?= $block->escapeHtml($data['value'], ['br']) ?></td>
154  </tr>
155  <?php endforeach;?>
156  <?= $block->getChildHtml('extra_customer_info') ?>
157  </table>
158  </div>
159  </div>
160  </div>
161 </section>
162 
163 <section class="admin__page-section order-addresses">
164  <div class="admin__page-section-title">
165  <span class="title"><?= $block->escapeHtml(__('Address Information')) ?></span>
166  </div>
167  <div class="admin__page-section-content">
168  <div class="admin__page-section-item order-billing-address">
169  <?php /* Billing Address */ ?>
170  <div class="admin__page-section-item-title">
171  <span class="title"><?= $block->escapeHtml(__('Billing Address')) ?></span>
172  <div class="actions"><?= /* @noEscape */ $block->getAddressEditLink($order->getBillingAddress()); ?></div>
173  </div>
174  <address class="admin__page-section-item-content"><?= /* @noEscape */ $block->getFormattedAddress($order->getBillingAddress()); ?></address>
175  </div>
176  <?php if (!$block->getOrder()->getIsVirtual()): ?>
177  <div class="admin__page-section-item order-shipping-address">
178  <?php /* Shipping Address */ ?>
179  <div class="admin__page-section-item-title">
180  <span class="title"><?= $block->escapeHtml(__('Shipping Address')) ?></span>
181  <div class="actions"><?= /* @noEscape */ $block->getAddressEditLink($order->getShippingAddress()); ?></div>
182  </div>
183  <address class="admin__page-section-item-content"><?= /* @noEscape */ $block->getFormattedAddress($order->getShippingAddress()); ?></address>
184  </div>
185  <?php endif; ?>
186  </div>
187 </section>
$confirmationEmailStatusMessage
Definition: info.phtml:38
endforeach
Definition: info.phtml:47
foreach( $block->getCcAvailableTypes() as $typeCode=> $typeName)( $typeCode) ?>" <?php if ($typeCode endif
Definition: info.phtml:44
$orderAdminDate
Definition: info.phtml:15
$customerUrl
Definition: info.phtml:28
$orderStoreDate
Definition: info.phtml:21
$order
Definition: info.phtml:13
__()
Definition: __.php:13
$block
Definition: block.php:8