<?php
// templates/mail/en/order_confirmation.php

/**
 * @var int $order_id
 * @var string $product_list_html
 * @var float $total_amount
 * @var string $payment_method
 * @var string $order_details_link
 */
?>

<p>Hello,</p>
<p>Thank you for your order #<?php echo $order_id; ?>.</p>
<p><strong>Order Summary:</strong></p>
<ul>
    <?php foreach ($order_items as $item): ?>
        <li><?php echo htmlspecialchars($products[$item['product_id']] ?? 'Unknown Product'); ?> (Quantity: <?php echo $item['quantity']; ?>)</li>
    <?php endforeach; ?>
</ul>
<p><strong>Total:</strong> <?php echo format_money($total_amount, $lang, $db); ?></p>
<p><strong>Payment Method:</strong> <?php echo htmlspecialchars(ucfirst(str_replace('_', ' ', $payment_method))); ?></p>
<p>You can view your order details here: <a href="<?php echo $order_details_link; ?>"><?php echo $order_details_link; ?></a></p>
<p>Thank you for your business!</p>