Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
details.phtml
Go to the documentation of this file.
1 <?php
7 // @codingStandardsIgnoreFile
8 
11 $parentBlock = $block->getParentBlock();
12 $track = $block->getData('track');
13 $email = $block->getData('storeSupportEmail');
15  'Status' => 'getStatus',
16  'Signed by' => 'getSignedby',
17  'Delivered to' => 'getDeliveryLocation',
18  'Shipped or billed on' => 'getShippedDate',
19  'Service Type' => 'getService',
20  'Weight' => 'getWeight',
21 ];
22 $number = is_object($track) ? $track->getTracking() : $track['number'];
23 ?>
24 <table class="data table order tracking" id="tracking-table-popup-<?= $block->escapeHtml($number) ?>">
25  <caption class="table-caption"><?= $block->escapeHtml(__('Order tracking')) ?></caption>
26  <tbody>
27  <?php if (is_object($track)): ?>
28  <tr>
29  <th class="col label" scope="row"><?= $block->escapeHtml(__('Tracking Number:')) ?></th>
30  <td class="col value"><?= $block->escapeHtml($number) ?></td>
31  </tr>
32  <?php if ($track->getCarrierTitle()): ?>
33  <tr>
34  <th class="col label" scope="row"><?= $block->escapeHtml(__('Carrier:')) ?></th>
35  <td class="col value"><?= $block->escapeHtml($track->getCarrierTitle()) ?></td>
36  </tr>
37  <?php endif; ?>
38  <?php if ($track->getErrorMessage()): ?>
39  <tr>
40  <th class="col label" scope="row"><?= $block->escapeHtml(__('Error:')) ?></th>
41  <td class="col error">
42  <?= $block->escapeHtml(__('Tracking information is currently not available. Please ')) ?>
43  <?php if ($parentBlock->getContactUsEnabled()) : ?>
44  <a href="<?= $block->escapeUrl($parentBlock->getContactUs()) ?>" target="_blank"
45  title="<?= $block->escapeHtml(__('contact us')) ?>">
46  <?= $block->escapeHtml(__('contact us')) ?>
47  </a>
48  <?= $block->escapeHtml(__(' for more information or ')) ?>
49  <?php endif; ?>
50  <?= $block->escapeHtml(__('email us at ')) ?>
51  <a href="mailto:<?= /* @noEscape */ $email ?>"><?= /* @noEscape */ $email ?></a>
52  </td>
53  </tr>
54  <?php elseif ($track->getTrackSummary()): ?>
55  <tr>
56  <th class="col label" scope="row"><?= $block->escapeHtml(__('Info:')) ?></th>
57  <td class="col value"><?= $block->escapeHtml($track->getTrackSummary()) ?></td>
58  </tr>
59  <?php elseif ($track->getUrl()): ?>
60  <tr>
61  <th class="col label" scope="row"><?= $block->escapeHtml(__('Track:')) ?></th>
62  <td class="col value">
63  <a href="<?= $block->escapeUrl($track->getUrl()) ?>" target="_blank">
64  <?= $block->escapeUrl($track->getUrl()) ?>
65  </a>
66  </td>
67  </tr>
68  <?php else: ?>
69  <?php foreach ($fields as $title => $property): ?>
70  <?php if (!empty($track->$property())): ?>
71  <tr>
72  <th class="col label" scope="row"><?= /* @noEscape */ $block->escapeHtml(__($title . ':')) ?></th>
73  <td class="col value"><?= $block->escapeHtml($track->$property()) ?></td>
74  </tr>
75  <?php endif;?>
76  <?php endforeach; ?>
77 
78  <?php if ($track->getDeliverydate()): ?>
79  <tr>
80  <th class="col label" scope="row"><?= $block->escapeHtml(__('Delivered on:')) ?></th>
81  <td class="col value">
82  <?= /* @noEscape */ $parentBlock->formatDeliveryDateTime($track->getDeliverydate(), $track->getDeliverytime()) ?>
83  </td>
84  </tr>
85  <?php endif; ?>
86  <?php endif; ?>
87  <?php elseif (isset($track['title']) && isset($track['number']) && $track['number']): ?>
88  <?php /* if the tracking is custom value */ ?>
89  <tr>
90  <th class="col label" scope="row">
91  <?= ($track['title'] ? $block->escapeHtml($track['title']) : $block->escapeHtml(__('N/A'))) ?>:
92  </th>
93  <td class="col value"><?= (isset($track['number']) ? $block->escapeHtml($track['number']) : '') ?></td>
94  </tr>
95  <?php endif; ?>
96  </tbody>
97 </table>
$title
Definition: default.phtml:14
elseif(isset( $params[ 'redirect_parent']))
Definition: iframe.phtml:17
$track
Definition: details.phtml:12
$email
Definition: details.phtml:13
$number
Definition: details.phtml:22
$fields
Definition: details.phtml:14
__()
Definition: __.php:13
endif
Definition: details.phtml:40
$block
Definition: block.php:8
$parentBlock
Definition: details.phtml:11
endforeach
Definition: details.phtml:35