package_items.phtml 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. <?php
  2. /**
  3. * Refer to LICENSE.txt distributed with the Temando Shipping module for notice of license
  4. */
  5. ?>
  6. <?php
  7. /** @var \Magento\Shipping\Block\Adminhtml\View\Items $block */
  8. /** @var \Temando\Shipping\ViewModel\Shipment\ShipmentDetails $viewModel */
  9. $viewModel = $block->getData('viewModel');
  10. /** @var \Temando\Shipping\Model\Shipment\PackageItemInterface[] $shipmentItems */
  11. $shipmentItems = $viewModel->getItems();
  12. ?>
  13. <section class="admin__page-section">
  14. <div class="admin__table-wrapper shipment-items">
  15. <?php if (!empty($shipmentItems)) : ?>
  16. <table class="data-table admin__table-primary items">
  17. <thead>
  18. <tr class="headings">
  19. <th class="col-product"><span><?= $block->escapeHtml(__('Sku')) ?></span></th>
  20. <th class="col-product"><span><?= $block->escapeHtml(__('Qty Shipped')) ?></span></th>
  21. <th class="col-product"><span><?= $block->escapeHtml(__('Description')) ?></span></th>
  22. <th class="col-product"><span><?= $block->escapeHtml(__('HS Code')) ?></span></th>
  23. <th class="col-product"><span><?= $block->escapeHtml(__('Weight')) ?></span></th>
  24. <th class="col-product"><span><?= $block->escapeHtml(__('Country of Manufacture')) ?></span></th>
  25. <th class="col-product"><span><?= $block->escapeHtml(__('Country of Origin')) ?></span></th>
  26. <th class="col-product"><span><?= $block->escapeHtml(__('Declared value')) ?></span></th>
  27. </tr>
  28. </thead>
  29. <tbody>
  30. <?php foreach ($shipmentItems as $shipmentItem) : ?>
  31. <tr class="item-head">
  32. <td><?= $block->escapeHtml($shipmentItem->getSku()) ?></td>
  33. <td><?= $block->escapeHtml($shipmentItem->getQty()) ?></td>
  34. <td><?= $block->escapeHtml($shipmentItem->getDescription()) ?></td>
  35. <td><?= $block->escapeHtml($shipmentItem->getHsCode()) ?></td>
  36. <td><?= $block->escapeHtml($shipmentItem->getWeight()) ?></td>
  37. <td><?= $block->escapeHtml($shipmentItem->getCountryOfManufacture()) ?></td>
  38. <td><?= $block->escapeHtml($shipmentItem->getCountryOfOrigin()) ?></td>
  39. <td><?= $block->escapeHtml($shipmentItem->getMonetaryValue()) ?></td>
  40. </tr>
  41. <tr class="items-foot">
  42. <td colspan="9"></td>
  43. </tr>
  44. <?php endforeach; ?>
  45. </tbody>
  46. </table>
  47. <?php else : ?>
  48. <?= $block->escapeHtml(__('Item details are not available for this shipment.')) ?>
  49. <?php endif; ?>
  50. </div>
  51. </section>