Show wallet/gift card discount line on order confirmation page

Total already reflected the discount correctly, but subtotal + shipping
did not reconcile with it visually since the discount was never shown as
its own line item - matches the same row already present on checkout.php.
This commit is contained in:
Myron Blair
2026-07-05 15:19:47 +00:00
parent e02436618c
commit 9771d53b19
+8 -1
View File
@@ -87,7 +87,14 @@ require_once __DIR__ . '/includes/header.php';
<span>Shipping</span>
<span><?= $order['shipping_cost'] > 0 ? formatCurrency($order['shipping_cost']) : 'FREE' ?></span>
</div>
<?php if (!empty($order['wallet_amount_used']) && (float) $order['wallet_amount_used'] > 0): ?>
<div style="display: flex; justify-content: space-between; padding: 0.75rem 0; border-bottom: 1px solid var(--color-border);">
<span>Wallet / Gift Card</span>
<span class="text-success">-<?= formatCurrency($order['wallet_amount_used']) ?></span>
</div>
<?php endif; ?>
<div style="display: flex; justify-content: space-between; padding: 0.75rem 0; font-weight: 600; font-size: 1.125rem;">
<span>Total</span>
<span><?= formatCurrency($order['total']) ?></span>