Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.
 
 
 
 
 
 

88 строки
3.5 KiB

  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. /**
  8. * @var $block \Magento\Shipping\Block\Tracking\Popup
  9. * @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer
  10. */
  11. $results = $block->getTrackingInfo();
  12. ?>
  13. <div class="page tracking">
  14. <?php if (!empty($results)): ?>
  15. <?php foreach ($results as $shipId => $result): ?>
  16. <?php if ($shipId): ?>
  17. <div class="order subtitle caption">
  18. <?= /* @noEscape */ $block->escapeHtml(__('Shipment #')) . $shipId ?>
  19. </div>
  20. <?php endif; ?>
  21. <?php if (!empty($result)): ?>
  22. <?php foreach ($result as $counter => $track): ?>
  23. <div class="table-wrapper">
  24. <?php
  25. $shipmentBlockIdentifier = $shipId . '.' . $counter;
  26. $block->addChild('shipping.tracking.details.' . $shipmentBlockIdentifier, Template::class, [
  27. 'track' => $track,
  28. 'template' => 'Magento_Shipping::tracking/details.phtml',
  29. 'storeSupportEmail' => $block->getStoreSupportEmail()
  30. ]);
  31. ?>
  32. <?= /* @noEscape */ $block->getChildHtml('shipping.tracking.details.' .
  33. $shipmentBlockIdentifier) ?>
  34. </div>
  35. <?php if (is_object($track) && !empty($track->getProgressdetail())): ?>
  36. <?php
  37. $block->addChild(
  38. 'shipping.tracking.progress.' . $shipmentBlockIdentifier,
  39. Template::class,
  40. ['track' => $track, 'template' => 'Magento_Shipping::tracking/progress.phtml']
  41. );
  42. ?>
  43. <?= /* @noEscape */ $block->getChildHtml('shipping.tracking.progress.' .
  44. $shipmentBlockIdentifier) ?>
  45. <?php endif; ?>
  46. <?php endforeach; ?>
  47. <?php else: ?>
  48. <div class="message info empty">
  49. <div><?= $block->escapeHtml(__('There is no tracking available for this shipment.')) ?></div>
  50. </div>
  51. <?php endif; ?>
  52. <?php endforeach; ?>
  53. <?php else: ?>
  54. <div class="message info empty">
  55. <div><?= $block->escapeHtml(__('There is no tracking available.')) ?></div>
  56. </div>
  57. <?php endif; ?>
  58. <div class="actions">
  59. <button type="button"
  60. title="<?= $block->escapeHtml(__('Close Window')) ?>"
  61. class="action close">
  62. <span><?= $block->escapeHtml(__('Close Window')) ?></span>
  63. </button>
  64. <?= /* @noEscape */ $secureRenderer->renderEventListenerAsTag(
  65. 'onclick',
  66. "window.close(); window.opener.focus();",
  67. 'button.action.close'
  68. ) ?>
  69. </div>
  70. </div>
  71. <?php $scriptString = <<<script
  72. require([
  73. 'jquery'
  74. ], function (jQuery) {
  75. /* hide the close button when the content doesn't open in a modal window */
  76. if (window.opener === null || typeof window.opener === "undefined") {
  77. jQuery('.actions button.close').hide();
  78. }
  79. });
  80. script;
  81. ?>
  82. <?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>