PluginProbe
FluentCart A New Era of eCommerce – Faster, Lighter, and Simpler / 1.5.1
FluentCart A New Era of eCommerce – Faster, Lighter, and Simpler v1.5.1
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 / subscription / reminder / customer.php

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

74 lines 3.3 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\Subscription $subscription
5 * @var \FluentCart\App\Models\Order $order
6 * @var array $reminder
7 */
8
9 $reminder = (isset($reminder) && is_array($reminder)) ? $reminder : [];
10 $billingDate = \FluentCart\Framework\Support\Arr::get($reminder, 'billing_date', $subscription->next_billing_date);
11 $billingLabel = $billingDate ? \FluentCart\App\Services\DateTime\DateTime::gmtToTimezone($billingDate)->format('M d, Y h:i A') : '';
12 $renewalAmount = $subscription->recurring_total ?? 0;
13 $billingInterval = $subscription->billing_interval ?? '';
14 ?>
15
16 <div class="space_bottom_30">
17 <p>
18 <?php
19 printf(
20 /* translators: %s is customer name */
21 esc_html__('Hello %s,', 'fluent-cart'),
22 esc_html($subscription->customer->full_name)
23 );
24 ?>
25 </p>
26 <p>
27 <?php
28 printf(
29 /* translators: %s is subscription item name */
30 esc_html__('This is a friendly reminder that your subscription for %s will renew soon.', 'fluent-cart'),
31 '<b>' . esc_html($subscription->item_name) . '</b>'
32 );
33 ?>
34 </p>
35 <table role="presentation" cellpadding="0" cellspacing="0" width="100%" style="border:1px solid #e5e7eb;border-radius:8px;padding:14px 16px;margin:12px 0 0;">
36 <tbody>
37 <tr>
38 <td style="font-size:13px;color:#6b7280;padding:0 0 6px;"><?php esc_html_e('Subscription', 'fluent-cart'); ?></td>
39 <td style="font-size:13px;color:#111827;font-weight:600;padding:0 0 6px;text-align:right;"><?php echo esc_html($subscription->item_name); ?></td>
40 </tr>
41 <?php if ($renewalAmount): ?>
42 <tr>
43 <td style="font-size:13px;color:#6b7280;padding:0 0 6px;"><?php esc_html_e('Renewal Amount', 'fluent-cart'); ?></td>
44 <td style="font-size:14px;color:#111827;font-weight:700;padding:0 0 6px;text-align:right;">
45 <?php echo esc_html(\FluentCart\Api\CurrencySettings::getFormattedPrice($renewalAmount, null, false, true, true)); ?>
46 <?php if ($billingInterval): ?>
47 <span style="font-size:12px;font-weight:400;color:#6b7280;">(<?php echo esc_html($billingInterval); ?>)</span>
48 <?php endif; ?>
49 </td>
50 </tr>
51 <?php endif; ?>
52 <?php if ($billingLabel): ?>
53 <tr>
54 <td style="font-size:13px;color:#6b7280;padding:0;"><?php esc_html_e('Next Billing Date', 'fluent-cart'); ?></td>
55 <td style="font-size:13px;color:#111827;font-weight:600;padding:0;text-align:right;"><?php echo esc_html($billingLabel); ?></td>
56 </tr>
57 <?php endif; ?>
58 </tbody>
59 </table>
60 </div>
61
62 <div class="space_bottom_30">
63 <p style="font-size:14px;color:#6b7280;">
64 <?php esc_html_e('If you wish to cancel your subscription, you can do so from your account dashboard before the renewal date.', 'fluent-cart'); ?>
65 </p>
66 </div>
67
68 <?php
69 \FluentCart\App\App::make('view')->render('emails.parts.call_to_action_box', [
70 'content' => __('Review your subscription details, manage payment methods, or cancel from your account dashboard.', 'fluent-cart'),
71 'link' => $subscription->getViewUrl('customer'),
72 'button_text' => __('Manage Subscription', 'fluent-cart'),
73 ]);
74