PluginProbe
FluentCart A New Era of eCommerce – Faster, Lighter, and Simpler / 1.3.27
FluentCart A New Era of eCommerce – Faster, Lighter, and Simpler v1.3.27
1.6.6 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 All 49 releases
fluent-cart / app / Views / emails / order / reminder / due / customer.php

customer.php in FluentCart A New Era of eCommerce – Faster, Lighter, and Simpler 1.3.27, at app/Views/emails/order/reminder/due/customer.php

68 lines 3.1 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 * @var \FluentCart\App\Models\Order $order
5 * @var array $reminder
6 */
7
8 $reminder = (isset($reminder) && is_array($reminder)) ? $reminder : [];
9 $dueAt = \FluentCart\Framework\Support\Arr::get($reminder, 'due_at', '');
10 $dueDate = $dueAt ? \FluentCart\App\Services\DateTime\DateTime::gmtToTimezone($dueAt)->format('M d, Y h:i A') : '';
11 $dueAmount = \FluentCart\Framework\Support\Arr::get($reminder, 'due_amount', 0);
12 if (!$dueAmount) {
13 $dueAmount = max(((int)$order->total_amount - (int)$order->total_paid), 0);
14 }
15 $paymentLink = \FluentCart\Framework\Support\Arr::get($reminder, 'payment_link', \FluentCart\App\Services\Payments\PaymentHelper::getCustomPaymentLink($order->uuid));
16 $orderRef = !empty($order->invoice_no) ? $order->invoice_no : '#' . $order->id;
17 ?>
18
19 <div class="space_bottom_30">
20 <p>
21 <?php
22 printf(
23 /* translators: %s is the customer name */
24 esc_html__('Hello %s,', 'fluent-cart'),
25 esc_html($order->customer->full_name)
26 );
27 ?>
28 </p>
29 <p>
30 <?php
31 printf(
32 /* translators: %s is the order reference */
33 esc_html__('This is a friendly reminder that payment for order %s is due.', 'fluent-cart'),
34 '<b>' . esc_html($orderRef) . '</b>'
35 );
36 ?>
37 </p>
38 <table role="presentation" cellpadding="0" cellspacing="0" width="100%" style="border:1px solid #e5e7eb;border-radius:8px;padding:14px 16px;margin:12px 0 0;">
39 <tbody>
40 <tr>
41 <td style="font-size:13px;color:#6b7280;padding:0 0 6px;"><?php esc_html_e('Order ID', 'fluent-cart'); ?></td>
42 <td style="font-size:13px;color:#111827;font-weight:600;padding:0 0 6px;text-align:right;">#<?php echo esc_html($order->id); ?></td>
43 </tr>
44 <tr>
45 <td style="font-size:13px;color:#6b7280;padding:0 0 6px;"><?php esc_html_e('Order Reference', 'fluent-cart'); ?></td>
46 <td style="font-size:13px;color:#111827;font-weight:600;padding:0 0 6px;text-align:right;"><?php echo esc_html($orderRef); ?></td>
47 </tr>
48 <tr>
49 <td style="font-size:13px;color:#6b7280;padding:0 0 6px;"><?php esc_html_e('Amount Due', 'fluent-cart'); ?></td>
50 <td style="font-size:14px;color:#111827;font-weight:700;padding:0 0 6px;text-align:right;"><?php echo esc_html(\FluentCart\Api\CurrencySettings::getFormattedPrice($dueAmount, null, false, true, true)); ?></td>
51 </tr>
52 <?php if ($dueDate): ?>
53 <tr>
54 <td style="font-size:13px;color:#6b7280;padding:0;"><?php esc_html_e('Due Date', 'fluent-cart'); ?></td>
55 <td style="font-size:13px;color:#111827;font-weight:600;padding:0;text-align:right;"><?php echo esc_html($dueDate); ?></td>
56 </tr>
57 <?php endif; ?>
58 </tbody>
59 </table>
60 </div>
61
62 <?php
63 \FluentCart\App\App::make('view')->render('emails.parts.call_to_action_box', [
64 'content' => __('Please complete your payment to keep your order active.', 'fluent-cart'),
65 'link' => $paymentLink,
66 'button_text' => __('Pay Now', 'fluent-cart'),
67 ]);
68