PluginProbe
Fluent Booking – The Ultimate Appointments Scheduling, Events Booking, Events Calendar Solution / 1.5.21
Fluent Booking – The Ultimate Appointments Scheduling, Events Booking, Events Calendar Solution v1.5.21
2.4.0 2.3.0 2.2.5 2.2.0 2.1.2 2.1.1 trunk 1.10.0 1.10.01 1.10.02 1.5.0 1.5.01 1.5.02 1.5.1 1.5.10 1.5.20 1.5.21 1.5.22 1.5.23 1.5.24 1.5.25 1.6.0 1.7.0 1.7.1 1.7.2 All 33 releases
fluent-booking / app / Views / public / receipt / order-items-table.php

order-items-table.php in Fluent Booking – The Ultimate Appointments Scheduling, Events Booking, Events Calendar Solution 1.5.21, at app/Views/public/receipt/order-items-table.php

82 lines 3.7 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 defined( 'ABSPATH' ) || exit;
4
5 if (!$order->items) {
6 return '';
7 }
8 $currencySign = \FluentBooking\App\Services\CurrenciesHelper::getGlobalCurrencySign();
9
10 $currencySetting = [
11 'currency_sign' => $currencySign,
12 ];
13
14 ?>
15 <table class="table fluent_booking_order_items_table fluent_booking_table table_bordered">
16 <thead>
17 <th><?php esc_html_e('Item', 'fluent-booking'); ?></th>
18 <th><?php esc_html_e('Quantity', 'fluent-booking'); ?></th>
19 <th><?php esc_html_e('Price', 'fluent-booking'); ?></th>
20 <th><?php esc_html_e('Line Total', 'fluent-booking'); ?></th>
21 </thead>
22 <tbody>
23 <?php $subTotal = 0; ?>
24 <?php foreach ($order->items->toArray() as $order_item) {
25 if (is_array($order_item)) {
26 if ($order_item['item_total']) :?>
27 <tr>
28 <td><?php echo esc_html($order_item['item_name']); ?></td>
29 <td><?php echo esc_html($order_item['quantity']); ?></td>
30 <td><?php echo esc_attr(fluentbookingFormattedAmount($order_item['item_price'], $currencySetting)); ?></td>
31 <td><?php echo esc_attr(fluentbookingFormattedAmount($order_item['item_total'], $currencySetting)); ?></td>
32 </tr>
33 <?php
34 $subTotal += $order_item['item_total'];
35 endif;
36 } else {
37 if ($order_item->item_total) :?>
38 <tr>
39 <td><?php echo esc_html($order_item->item_name); ?></td>
40 <td><?php echo esc_html($order_item->quantity); ?></td>
41 <td><?php echo esc_html(fluentbookingFormattedAmount($order_item->item_price, $currencySetting)); ?></td>
42 <td><?php echo esc_html(fluentbookingFormattedAmount($order_item->item_total, $currencySetting)); ?></td>
43 </tr>
44 <?php
45 $subTotal += $order_item->item_total;
46 endif;
47 }
48
49 };
50 ?>
51 </tbody>
52 <tfoot>
53 <?php $discountTotal = 0;
54 if (isset($order->discounts['applied']) && count($order->discounts['applied'])) : ?>
55 <tr class="fluent_booking_total_row">
56 <th style="text-align: right" colspan="3"><?php esc_html_e('Sub-Total', 'fluent-booking'); ?></th>
57 <td><?php echo esc_html(fluentbookingFormattedAmount($subTotal, $currencySetting)); ?></td>
58 </tr>
59 <?php
60 foreach ($order->discounts['applied'] as $discount) :
61 $discountTotal += $discount->item_total;
62 ?>
63 <tr class="fluent_booking_discount_row">
64 <th style="text-align: right"
65 colspan="3"><?php echo 'Discounts (' . esc_html($discount->item_name) . ' )'; ?></th>
66 <td><?php echo '-' . esc_html(fluentbookingFormattedAmount($discount->item_total, $currencySetting)); ?></td>
67 </tr>
68 <?php endforeach; ?>
69 <?php endif; ?>
70 <tr class="fluent_booking_total_payment_row">
71 <th style="text-align: right" colspan="3"><?php esc_html_e('Total', 'fluent-booking'); ?></th>
72 <td>
73 <?php if (isset($hasSubscription) && $hasSubscription) : ?>
74 <?php echo esc_attr(fluentbookingFormattedAmount($order->total_amount, $currencySetting)); ?>
75 <?php else: ?>
76 <?php echo esc_attr(fluentbookingFormattedAmount($order->total_amount - $discountTotal, $currencySetting)); ?>
77 <?php endif; ?>
78 </td>
79 </tr>
80 </tfoot>
81 </table>
82