solve.phtml 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  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 /** @var \Temando\Shipping\Block\Adminhtml\Dispatch\Solve $block */ ?>
  8. <?php $failedShipments = $block->getFailedShipments() ?>
  9. <section class="admin__page-section">
  10. <h2><?= $block->escapeHtml(__('%1 Shipment(s) were not included in this dispatch', count($failedShipments))) ?></h2>
  11. <h3><?= $block->escapeHtml(__('Steps to find a solution')) ?></h3>
  12. <ol>
  13. <li><?= $block->escapeHtml(__('Review the errors below. If there is an issue which can be resolved with the carrier, please contact them directly.')) ?></li>
  14. <li><?= /* @noEscape */ __('Try <a href="%1">Create Dispatch</a> with the same Carrier and Location to re-attempt to dispatch these.', $block->escapeUrl($block->getNewUrl())) ?></li>
  15. <li><a href="<?= $block->escapeUrl($block->getShippingPortalUrl()) ?>"
  16. target="_blank" rel="noopener noreferrer"><?= $block->escapeHtml(__('Contact Magento Shipping Support')) ?></a>
  17. </li>
  18. </ol>
  19. <div class="admin__data-grid-wrap">
  20. <table class="data-grid">
  21. <thead>
  22. <tr>
  23. <th class="data-grid-th"><?= $block->escapeHtml(__('Magento Shipping ID'))?></th>
  24. <th class="data-grid-th"><?= $block->escapeHtml(__('Reason'))?></th>
  25. <th class="data-grid-th"><?= $block->escapeHtml(__('Action'))?></th>
  26. </tr>
  27. </thead>
  28. <tbody>
  29. <?php foreach ($failedShipments as $failedShipment) : ?>
  30. <tr class="data-row">
  31. <td><?= $block->escapeHtml($failedShipment->getData('shipment_id')) ?></td>
  32. <td>
  33. <?php $errors = $failedShipment->hasData('errors') ? $failedShipment->getData('errors') : []; ?>
  34. <?php foreach ($errors as $error) : ?>
  35. <p>
  36. <strong><?= $block->escapeHtml($error->getData('title')) ?></strong><br>
  37. <?= $block->escapeHtml($error->getData('detail')) ?>
  38. </p>
  39. <?php endforeach; ?>
  40. </td>
  41. <td>
  42. <?php $shipmentUrl = $block->getShipmentUrl($failedShipment->getShipmentId()) ?>
  43. <a href="<?= $block->escapeUrl($shipmentUrl) ?>"><?= $block->escapeHtml(__('View Shipment')) ?></a>
  44. </td>
  45. </tr>
  46. <?php endforeach; ?>
  47. </tbody>
  48. </table>
  49. </div>
  50. </section>