popup.phtml 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. use Magento\Framework\View\Element\Template;
  7. // @codingStandardsIgnoreFile
  8. /** @var $block \Magento\Shipping\Block\Tracking\Popup */
  9. $results = $block->getTrackingInfo();
  10. ?>
  11. <div class="page tracking">
  12. <?php if (!empty($results)): ?>
  13. <?php foreach ($results as $shipId => $result): ?>
  14. <?php if ($shipId): ?>
  15. <div class="order subtitle caption"><?= /* @noEscape */ $block->escapeHtml(__('Shipment #')) . $shipId ?></div>
  16. <?php endif; ?>
  17. <?php if (!empty($result)): ?>
  18. <?php foreach ($result as $counter => $track): ?>
  19. <div class="table-wrapper">
  20. <?php
  21. $shipmentBlockIdentifier = $shipId . '.' . $counter;
  22. $block->addChild('shipping.tracking.details.' . $shipmentBlockIdentifier, Template::class, [
  23. 'track' => $track,
  24. 'template' => 'Magento_Shipping::tracking/details.phtml',
  25. 'storeSupportEmail' => $block->getStoreSupportEmail()
  26. ]
  27. );
  28. ?>
  29. <?= /* @noEscape */ $block->getChildHtml('shipping.tracking.details.' . $shipmentBlockIdentifier) ?>
  30. </div>
  31. <?php if (is_object($track) && !empty($track->getProgressdetail())): ?>
  32. <?php
  33. $block->addChild('shipping.tracking.progress.' . $shipmentBlockIdentifier, Template::class, [
  34. 'track' => $track,
  35. 'template' => 'Magento_Shipping::tracking/progress.phtml'
  36. ]);
  37. ?>
  38. <?= /* @noEscape */ $block->getChildHtml('shipping.tracking.progress.' . $shipmentBlockIdentifier) ?>
  39. <?php endif; ?>
  40. <?php endforeach; ?>
  41. <?php else: ?>
  42. <div class="message info empty">
  43. <div><?= $block->escapeHtml(__('There is no tracking available for this shipment.')) ?></div>
  44. </div>
  45. <?php endif; ?>
  46. <?php endforeach; ?>
  47. <?php else: ?>
  48. <div class="message info empty">
  49. <div><?= $block->escapeHtml(__('There is no tracking available.')) ?></div>
  50. </div>
  51. <?php endif; ?>
  52. <div class="actions">
  53. <button type="button"
  54. title="<?= $block->escapeHtml(__('Close Window')) ?>"
  55. class="action close"
  56. onclick="window.close(); window.opener.focus();">
  57. <span><?= $block->escapeHtml(__('Close Window')) ?></span>
  58. </button>
  59. </div>
  60. </div>