solve.phtml 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. <?php
  2. /**
  3. * Refer to LICENSE.txt distributed with the Temando Shipping module for notice of license
  4. */
  5. ?>
  6. <?php // @codingStandardsIgnoreFile ?>
  7. <?php
  8. /** @var \Magento\Backend\Block\Template $block */
  9. /** @var \Temando\Shipping\ViewModel\Batch\BatchDetails $viewModel */
  10. /** @var \Temando\Shipping\ViewModel\Account\Support $supportViewModel */
  11. $viewModel = $block->getData('viewModel');
  12. $supportViewModel = $block->getData('supportViewModel');
  13. /** @var \Temando\Shipping\Model\Batch $batch */
  14. $batch = $viewModel->getBatch();
  15. ?>
  16. <?php $failedShipments = $batch->getFailedShipments() ?>
  17. <section class="admin__page-section batch-solve">
  18. <h2><?= $block->escapeHtml(__('%1 Shipments(s) failed to book in this Batch', count($failedShipments))) ?></h2>
  19. <h3><?= $block->escapeHtml(__('Steps to find a solution')) ?></h3>
  20. <ol class="list-items">
  21. <li>
  22. <?= $block->escapeHtml(__('Review the errors, address them where possible and attempt to re-process the Order/s.')) ?>
  23. <ol class="sub-list" type="a">
  24. <li>
  25. <?= $block->escapeHtml(__('If the error is related to the carrier in question, please contact the carrier directly.')) ?>
  26. </li>
  27. </ol>
  28. </li>
  29. <li><a href="<?= $block->escapeUrl($supportViewModel->getShippingPortalUrl()) ?>"
  30. target="_blank" rel="noopener noreferrer"><?= $block->escapeHtml(__('Contact Magento Shipping Support')) ?></a>
  31. </li>
  32. </ol>
  33. <div class="admin__data-grid-wrap">
  34. <table class="data-grid">
  35. <thead>
  36. <tr>
  37. <th class="data-grid-th"><?= $block->escapeHtml(__('Magento Order ID')) ?></th>
  38. <th class="data-grid-th"><?= $block->escapeHtml(__('Ship-to Name')) ?></th>
  39. <th class="data-grid-th"><?= $block->escapeHtml(__('Destination Address')) ?></th>
  40. <th class="data-grid-th"><?= $block->escapeHtml(__('Reason')) ?></th>
  41. <th class="data-grid-th"><?= $block->escapeHtml(__('Action')) ?></th>
  42. </tr>
  43. </thead>
  44. <tbody>
  45. <?php foreach ($failedShipments as $failedShipment) : ?>
  46. <tr class="data-row">
  47. <td><?= $block->escapeHtml($failedShipment->getOrderId()) ?></td>
  48. <td><?= $block->escapeHtml($failedShipment->getRecipientName()) ?></td>
  49. <td><?= /* @noEscape */ $failedShipment->getRecipientAddress() ?></td>
  50. <td>
  51. <?php foreach ($failedShipment->getErrors() as $error) : ?>
  52. <p>
  53. <strong><?= $block->escapeHtml($error->getTitle()) ?></strong><br>
  54. <?= $block->escapeHtml($error->getDetail()) ?>
  55. </p>
  56. <?php endforeach; ?>
  57. </td>
  58. <td>
  59. <?php $orderUrl = $viewModel->getOrderViewUrl($failedShipment->getOrderId()) ?>
  60. <a href="<?= $block->escapeUrl($orderUrl) ?>"><?= $block->escapeHtml(__('View Order')) ?></a>
  61. </td>
  62. </tr>
  63. <?php endforeach; ?>
  64. </tbody>
  65. </table>
  66. </div>
  67. </section>