Uname: Linux webm012.cluster130.gra.hosting.ovh.net 5.15.167-ovh-vps-grsec-zfs-classid #1 SMP Tue Sep 17 08:14:20 UTC 2024 x86_64
Software: Apache
PHP version: 8.0.30 [ PHP INFO ] PHP os: Linux
Server Ip: 145.239.37.162
Your Ip: 216.73.216.190
User: dreampi (1009562) | Group: users (100)
Safe Mode: OFF
Disable Function:
_dyuweyrj4,_dyuweyrj4r,dl

name : order-items-table.php
<?php

defined( 'ABSPATH' ) || exit;

if (!$order->items) {
    return '';
}
$currencySign = \FluentBooking\App\Services\CurrenciesHelper::getGlobalCurrencySign();

$currencySetting = [
        'currency_sign' => $currencySign,
];

?>
    <table class="table fluent_booking_order_items_table fluent_booking_table table_bordered">
        <thead>
        <th><?php esc_html_e('Item', 'fluent-booking'); ?></th>
        <th><?php esc_html_e('Quantity', 'fluent-booking'); ?></th>
        <th><?php esc_html_e('Price', 'fluent-booking'); ?></th>
        <th><?php esc_html_e('Line Total', 'fluent-booking'); ?></th>
        </thead>
        <tbody>
        <?php $subTotal = 0; ?>
        <?php foreach ($order->items->toArray() as $order_item) {
           if (is_array($order_item)) {
               if ($order_item['item_total']) :?>
                   <tr>
                       <td><?php echo esc_html($order_item['item_name']); ?></td>
                       <td><?php echo esc_html($order_item['quantity']); ?></td>
                       <td><?php echo esc_attr(fluentbookingFormattedAmount($order_item['item_price'], $currencySetting)); ?></td>
                       <td><?php echo esc_attr(fluentbookingFormattedAmount($order_item['item_total'], $currencySetting)); ?></td>
                   </tr>
                   <?php
                   $subTotal += $order_item['item_total'];
               endif;
           } else {
               if ($order_item->item_total) :?>
                   <tr>
                       <td><?php echo esc_html($order_item->item_name); ?></td>
                       <td><?php echo esc_html($order_item->quantity); ?></td>
                       <td><?php echo esc_html(fluentbookingFormattedAmount($order_item->item_price, $currencySetting)); ?></td>
                       <td><?php echo esc_html(fluentbookingFormattedAmount($order_item->item_total, $currencySetting)); ?></td>
                   </tr>
                   <?php
                   $subTotal += $order_item->item_total;
               endif;
           }

        };
        ?>
        </tbody>
        <tfoot>
        <?php $discountTotal = 0;
        if (isset($order->discounts['applied']) && count($order->discounts['applied'])) : ?>
            <tr class="fluent_booking_total_row">
                <th style="text-align: right" colspan="3"><?php esc_html_e('Sub-Total', 'fluent-booking'); ?></th>
                <td><?php echo esc_html(fluentbookingFormattedAmount($subTotal, $currencySetting)); ?></td>
            </tr>
            <?php
            foreach ($order->discounts['applied'] as $discount) :
                $discountTotal += $discount->item_total;
                ?>
                <tr class="fluent_booking_discount_row">
                    <th style="text-align: right"
                        colspan="3"><?php echo 'Discounts (' . esc_html($discount->item_name) . ' )'; ?></th>
                    <td><?php echo '-' . esc_html(fluentbookingFormattedAmount($discount->item_total, $currencySetting)); ?></td>
                </tr>
            <?php endforeach; ?>
        <?php endif; ?>
        <tr class="fluent_booking_total_payment_row">
            <th style="text-align: right" colspan="3"><?php esc_html_e('Total', 'fluent-booking'); ?></th>
            <td>
                <?php if (isset($hasSubscription) && $hasSubscription) : ?> 
                    <?php echo esc_attr(fluentbookingFormattedAmount($order->total_amount, $currencySetting)); ?>
                <?php else:  ?> 
                    <?php echo esc_attr(fluentbookingFormattedAmount($order->total_amount - $discountTotal, $currencySetting)); ?>
                <?php endif; ?>
            </td>
        </tr>
        </tfoot>
    </table>
© 2026 GrazzMean-Shell