| 1 |
<?php if ( ! defined( 'ABSPATH' ) ) exit; ?> |
| 2 |
<?php |
| 3 |
|
| 4 |
use FluentCart\App\App; |
| 5 |
use FluentCart\App\Helpers\Helper; |
| 6 |
?> |
| 7 |
|
| 8 |
<h2 style='margin-bottom: 20px;'>Order Summary</h2> |
| 9 |
|
| 10 |
<table style='width: 100%; margin-bottom: 30px;'> |
| 11 |
<tr> |
| 12 |
<td style='width: 50%; vertical-align: top;'> |
| 13 |
<div style='font-weight: bold; font-size: 16px; margin-bottom: 10px;'>Order Info</div> |
| 14 |
<div style='font-size: 14px; margin-bottom: 6px;'><strong>Order ID:</strong> #<?php echo esc_html($order->id)?></div> |
| 15 |
<div style='font-size: 14px;'><strong>Date:</strong> <?php echo esc_html($orderDate)?></div> |
| 16 |
</td> |
| 17 |
<td style='width: 50%; vertical-align: top; text-align: right;'> |
| 18 |
<div style='font-weight: bold; font-size: 16px; margin-bottom: 10px;'>Customer Info</div> |
| 19 |
<div style='font-size: 14px; margin-bottom: 6px;'><strong>Name:</strong> <?php echo esc_html($customerName)?></div> |
| 20 |
<div style='font-size: 14px;'><strong>Email:</strong> <?php echo esc_html($customerEmail)?></div> |
| 21 |
</td> |
| 22 |
</tr> |
| 23 |
</table> |
| 24 |
|
| 25 |
<table border='1' style='width: 100%; border-collapse: collapse;'> |
| 26 |
<thead> |
| 27 |
<tr style='background: #f9f9f9; text-align: left;'> |
| 28 |
<th style='padding: 10px;'>Products</th> |
| 29 |
<th style='padding: 10px; text-align: center;'>Quantity</th> |
| 30 |
<th style='padding: 10px; text-align: center;'>Price</th> |
| 31 |
<th style='padding: 10px; text-align: center;'>Total Price</th> |
| 32 |
</tr> |
| 33 |
</thead> |
| 34 |
<tbody> |
| 35 |
<?php |
| 36 |
foreach ($order->order_items as $item) { |
| 37 |
if (in_array($item->payment_type, ['fee', 'signup_fee'])) { |
| 38 |
continue; |
| 39 |
} |
| 40 |
$product = $item->product; |
| 41 |
echo wp_kses_post(App::view()->make('invoice.parts.table_row',[ |
| 42 |
'product' => $product, |
| 43 |
'item' => $item, |
| 44 |
])); |
| 45 |
} |
| 46 |
?> |
| 47 |
</tbody> |
| 48 |
</table> |
| 49 |
|
| 50 |
<table style='width: 100%; margin-top: 20px;'> |
| 51 |
<tr> |
| 52 |
<td style='text-align: right; font-weight: bold;'>Subtotal:</td> |
| 53 |
<td style='text-align: right;'><?php echo esc_html(Helper::toDecimal($subtotal)); ?></td> |
| 54 |
</tr> |
| 55 |
<tr> |
| 56 |
<td style='text-align: right; font-weight: bold;'>Discount:</td> |
| 57 |
<td style='text-align: right;'>- <?php echo esc_html(Helper::toDecimal($subtotal-$total)); ?> </td> |
| 58 |
</tr> |
| 59 |
<tr> |
| 60 |
<td style='text-align: right; font-weight: bold;'>Total:</td> |
| 61 |
<td style='text-align: right; font-size: 16px;'> <?php echo esc_html(Helper::toDecimal($total)); ?></td> |
| 62 |
</tr> |
| 63 |
</table> |
| 64 |
|