customer.phtml 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. <?php /** @var \Magento\Backend\Block\Template $block */ ?>
  2. <?php
  3. /** @var \Temando\Shipping\ViewModel\Pickup\PickupView $pickupViewModel */
  4. $pickupViewModel = $block->getData('pickupViewModel');
  5. /** @var \Temando\Shipping\ViewModel\Order\CustomerDetails $customerViewModel */
  6. $customerViewModel = $block->getData('customerViewModel');
  7. $order = $pickupViewModel->getOrder();
  8. ?>
  9. <div class="admin__page-section-item-title">
  10. <span class="title"><?= $block->escapeHtml(__('Account Information')) ?></span>
  11. <div class="actions">
  12. <?php if ($customerUrl = $customerViewModel->getCustomerViewUrl($order)) : ?>
  13. <a href="<?= $block->escapeUrl($customerUrl) ?>" target="_blank">
  14. <?= $block->escapeHtml(__('Edit Customer')) ?>
  15. </a>
  16. <?php endif; ?>
  17. </div>
  18. </div>
  19. <div class="admin__page-section-item-content">
  20. <table class="admin__table-secondary order-account-information-table">
  21. <tr>
  22. <th><?= $block->escapeHtml(__('Customer Name')) ?></th>
  23. <td>
  24. <?php if ($customerUrl = $customerViewModel->getCustomerViewUrl($order)) : ?>
  25. <a href="<?= $block->escapeUrl($customerUrl) ?>" target="_blank">
  26. <span><?= $block->escapeHtml($order->getCustomerName()) ?></span>
  27. </a>
  28. <?php else : ?>
  29. <?= $block->escapeHtml($order->getCustomerName()) ?>
  30. <?php endif; ?>
  31. </td>
  32. </tr>
  33. <tr>
  34. <th><?= $block->escapeHtml(__('Email')) ?></th>
  35. <td>
  36. <a href="mailto:<?= $block->escapeHtml($order->getCustomerEmail()) ?>">
  37. <?= $block->escapeHtml($order->getCustomerEmail()) ?>
  38. </a>
  39. </td>
  40. </tr>
  41. <?php if ($groupName = $customerViewModel->getCustomerGroupName($order)) : ?>
  42. <tr>
  43. <th><?= $block->escapeHtml(__('Customer Group')) ?></th>
  44. <td><?= $block->escapeHtml($groupName) ?></td>
  45. </tr>
  46. <?php endif; ?>
  47. <?php foreach ($customerViewModel->getCustomerAccountData($order) as $data) : ?>
  48. <tr>
  49. <th><?= $block->escapeHtml($data['label']) ?></th>
  50. <td><?= $block->escapeHtml($data['value'], ['br']) ?></td>
  51. </tr>
  52. <?php endforeach;?>
  53. <?= $block->getChildHtml('extra_customer_info') ?>
  54. </table>
  55. </div>