items.phtml 3.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. // @codingStandardsIgnoreFile
  7. ?>
  8. <?php /** @var $block \Magento\Shipping\Block\Items */ ?>
  9. <?php $_order = $block->getOrder() ?>
  10. <div class="actions-toolbar">
  11. <?php if ($_order->getTracksCollection()->count()) : ?>
  12. <?= $block->getChildHtml('track-all-link') ?>
  13. <?php endif; ?>
  14. <a href="<?= /* @escapeNotVerified */ $block->getPrintAllShipmentsUrl($_order) ?>"
  15. onclick="this.target='_blank'"
  16. class="action print">
  17. <span><?= /* @escapeNotVerified */ __('Print All Shipments') ?></span>
  18. </a>
  19. </div>
  20. <?php foreach ($_order->getShipmentsCollection() as $_shipment): ?>
  21. <div class="order-title">
  22. <strong><?= /* @escapeNotVerified */ __('Shipment #') ?><?= /* @escapeNotVerified */ $_shipment->getIncrementId() ?></strong>
  23. <a href="<?= /* @escapeNotVerified */ $block->getPrintShipmentUrl($_shipment) ?>"
  24. onclick="this.target='_blank'"
  25. class="action print">
  26. <span><?= /* @escapeNotVerified */ __('Print Shipment') ?></span>
  27. </a>
  28. <a href="#"
  29. data-mage-init='{"popupWindow": {"windowURL":"<?= /* @escapeNotVerified */ $this->helper('Magento\Shipping\Helper\Data')->getTrackingPopupUrlBySalesModel($_shipment) ?>","windowName":"trackshipment","width":800,"height":600,"top":0,"left":0,"resizable":1,"scrollbars":1}}'
  30. title="<?= /* @escapeNotVerified */ __('Track this shipment') ?>"
  31. class="action track">
  32. <span><?= /* @escapeNotVerified */ __('Track this shipment') ?></span>
  33. </a>
  34. </div>
  35. <?php $tracks = $_shipment->getTracksCollection(); ?>
  36. <?php if ($tracks->count()): ?>
  37. <dl class="order-tracking" id="my-tracking-table-<?= /* @escapeNotVerified */ $_shipment->getId() ?>">
  38. <dt class="tracking-title">
  39. <?= /* @escapeNotVerified */ __('Tracking Number(s):') ?>
  40. </dt>
  41. <dd class="tracking-content">
  42. <?php
  43. $i = 1;
  44. $_size = $tracks->count();
  45. foreach ($tracks as $track): ?>
  46. <?php if ($track->isCustom()): ?><?= $block->escapeHtml($track->getNumber()) ?><?php else: ?><a
  47. href="#"
  48. data-mage-init='{"popupWindow": {"windowURL":"<?= /* @escapeNotVerified */ $this->helper('Magento\Shipping\Helper\Data')->getTrackingPopupUrlBySalesModel($track) ?>","windowName":"trackorder","width":800,"height":600,"left":0,"top":0,"resizable":1,"scrollbars":1}}'
  49. class="action track"><span><?= $block->escapeHtml($track->getNumber()) ?></span>
  50. </a><?php endif; ?><?php if ($i != $_size): ?>, <?php endif; ?>
  51. <?php $i++;
  52. endforeach; ?>
  53. </dd>
  54. </dl>
  55. <?php endif; ?>
  56. <div class="table-wrapper order-items-shipment">
  57. <table class="data table table-order-items shipment" id="my-shipment-table-<?= /* @escapeNotVerified */ $_shipment->getId() ?>">
  58. <caption class="table-caption"><?= /* @escapeNotVerified */ __('Items Shipped') ?></caption>
  59. <thead>
  60. <tr>
  61. <th class="col name"><?= /* @escapeNotVerified */ __('Product Name') ?></th>
  62. <th class="col sku"><?= /* @escapeNotVerified */ __('SKU') ?></th>
  63. <th class="col qty"><?= /* @escapeNotVerified */ __('Qty Shipped') ?></th>
  64. </tr>
  65. </thead>
  66. <?php $_items = $_shipment->getAllItems(); ?>
  67. <?php foreach ($_items as $_item): ?>
  68. <?php if (!$_item->getOrderItem()->getParentItem()) : ?>
  69. <tbody>
  70. <?= $block->getItemHtml($_item) ?>
  71. </tbody>
  72. <?php endif; ?>
  73. <?php endforeach; ?>
  74. </table>
  75. </div>
  76. <?= $block->getCommentsHtml($_shipment) ?>
  77. <?php endforeach; ?>