| 1 |
<?php |
| 2 |
|
| 3 |
defined('ABSPATH') or die; |
| 4 |
|
| 5 |
// phpcs:disable WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound -- Template variables in view files |
| 6 |
?> |
| 7 |
<table style="width: 100%;border: 1px solid #cbcbcb;" class="table ffp_order_items_table ffp_table table_bordered"> |
| 8 |
<thead> |
| 9 |
<tr> |
| 10 |
<th><?php esc_html_e('Item', 'fluentform'); ?></th> |
| 11 |
<th><?php esc_html_e('Quantity', 'fluentform'); ?></th> |
| 12 |
<th><?php esc_html_e('Price', 'fluentform'); ?></th> |
| 13 |
<th><?php esc_html_e('Line Total', 'fluentform'); ?></th> |
| 14 |
</tr> |
| 15 |
</thead> |
| 16 |
<tbody> |
| 17 |
<?php foreach ($items as $order_item): ?> |
| 18 |
<tr> |
| 19 |
|
| 20 |
<td><?php echo fluentform_sanitize_html($order_item->item_name); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Escaped using wp_kses ?></td> |
| 21 |
<td><?php echo esc_html($order_item->quantity); ?></td> |
| 22 |
<td><?php echo fluentform_sanitize_html($order_item->formatted_item_price); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Formatted price contains decoded currency symbols ?></td> |
| 23 |
<td><?php echo fluentform_sanitize_html($order_item->formatted_line_total); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Formatted amount contains decoded currency symbols ?></td> |
| 24 |
</tr> |
| 25 |
<?php endforeach; ?> |
| 26 |
</tbody> |
| 27 |
<tfoot> |
| 28 |
<?php if($discount_items): ?> |
| 29 |
<tr class="ffp_total_row"> |
| 30 |
<th style="text-align: right" colspan="3"><?php esc_html_e('Sub-Total', 'fluentform'); ?></th> |
| 31 |
<td><?php echo fluentform_sanitize_html($subTotal); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Formatted amount contains decoded currency symbols ?></td> |
| 32 |
</tr> |
| 33 |
<?php foreach ($discount_items as $discount_item): ?> |
| 34 |
<tr class="ffp_total_row"> |
| 35 |
<th style="text-align: right" colspan="3"><?php esc_html_e('Discount:', 'fluentform'); ?> <?php echo fluentform_sanitize_html($discount_item->item_name); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></th> |
| 36 |
<td>-<?php echo fluentform_sanitize_html($discount_item->formatted_line_total); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Formatted amount contains decoded currency symbols ?></td> |
| 37 |
</tr> |
| 38 |
<?php endforeach; ?> |
| 39 |
<?php endif; ?> |
| 40 |
|
| 41 |
<tr class="ffp_total_row"> |
| 42 |
<th style="text-align: right" colspan="3"><?php esc_html_e('Total', 'fluentform'); ?></th> |
| 43 |
<td><?php echo fluentform_sanitize_html($orderTotal); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Formatted amount contains decoded currency symbols ?></td> |
| 44 |
</tr> |
| 45 |
</tfoot> |
| 46 |
|
| 47 |
</table> |
| 48 |
|