PluginProbe
FluentCart A New Era of eCommerce – Faster, Lighter, and Simpler / 1.3.21
FluentCart A New Era of eCommerce – Faster, Lighter, and Simpler v1.3.21
1.6.5 1.6.4 1.6.3 1.6.2 1.6.1 1.6.0 1.5.4 1.5.5 1.5.3 1.5.2 1.5.1 1.5.0 1.4.2 1.4.1 1.4.0 1.3.28 1.3.27 1.3.26 1.3.25 1.3.23 1.3.22 1.3.21 1.3.20 1.3.19 trunk All 48 releases
fluent-cart / app / Views / invoice / parts / invoice.php

invoice.php in FluentCart A New Era of eCommerce – Faster, Lighter, and Simpler 1.3.21, at app/Views/invoice/parts/invoice.php

64 lines 2.5 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
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