This commit is contained in:
2026-09-15 10:35:56 +08:00
commit 782f8ea7aa
4086 changed files with 631288 additions and 0 deletions
@@ -0,0 +1,45 @@
<?php
/** @var \Esun\LegacyOrder\Block\Adminhtml\Customer\Edit\Tab\LegacyOrders $block */
$orders = $block->getLegacyOrders();
?>
<div class="admin__page-section">
<div class="admin__page-section-title">
<span class="title"><?= $block->escapeHtml(__('Legacy Orders')) ?></span>
</div>
<div class="admin__page-section-content">
<?php if (!$orders): ?>
<div class="message message-info info">
<div><?= $block->escapeHtml(__('No legacy orders are linked to this customer.')) ?></div>
</div>
<?php else: ?>
<div class="admin__data-grid-wrap">
<table class="data-grid">
<thead>
<tr>
<th class="data-grid-th"><?= $block->escapeHtml(__('Legacy Order #')) ?></th>
<th class="data-grid-th"><?= $block->escapeHtml(__('Order Date')) ?></th>
<th class="data-grid-th"><?= $block->escapeHtml(__('Order Status')) ?></th>
<th class="data-grid-th"><?= $block->escapeHtml(__('Payment Status')) ?></th>
<th class="data-grid-th"><?= $block->escapeHtml(__('Shipping Status')) ?></th>
<th class="data-grid-th"><?= $block->escapeHtml(__('Grand Total')) ?></th>
<th class="data-grid-th"><?= $block->escapeHtml(__('Action')) ?></th>
</tr>
</thead>
<tbody>
<?php foreach ($orders as $order): ?>
<tr class="data-row">
<td><a href="<?= $block->escapeUrl($block->getLegacyOrderUrl((int)$order['legacy_order_id'])) ?>"><?= $block->escapeHtml($order['source_order_number']) ?></a></td>
<td><?= $block->escapeHtml($order['ordered_at'] ?: '-') ?></td>
<td><?= $block->escapeHtml($order['order_status'] ?: '-') ?></td>
<td><?= $block->escapeHtml($order['payment_status'] ?: '-') ?></td>
<td><?= $block->escapeHtml($order['shipping_status'] ?: '-') ?></td>
<td><?= $block->escapeHtml(($order['currency'] ?: '') . ' ' . $order['grand_total']) ?></td>
<td><a href="<?= $block->escapeUrl($block->getLegacyOrderUrl((int)$order['legacy_order_id'])) ?>"><?= $block->escapeHtml(__('View')) ?></a></td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
</div>
<?php endif; ?>
</div>
</div>