PluginProbe
FluentCart A New Era of eCommerce – Faster, Lighter, and Simpler / 1.5.2
FluentCart A New Era of eCommerce – Faster, Lighter, and Simpler v1.5.2
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 / invoice / thank_you.php

thank_you.php in FluentCart A New Era of eCommerce – Faster, Lighter, and Simpler 1.5.2, at app/Views/invoice/thank_you.php

649 lines 49.7 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 use FluentCart\App\App;
5 use FluentCart\Api\StoreSettings;
6 use FluentCart\App\Helpers\Helper;
7 use FluentCart\Framework\Support\Arr;
8 use FluentCart\App\Modules\Tax\TaxModule;
9 use FluentCart\App\Services\Renderer\Receipt\TaxSummaryHelper;
10
11 $settings = new StoreSettings();
12 $profilePage = $settings->getCustomerProfilePage();
13
14 $bgColor = '#d4edda';
15 $titleColor = '#155724';
16 $iconBg = '#155724bd';
17
18 if ($order->payment_status !== 'paid') {
19 $bgColor = '#fff3cd';
20 $titleColor = '#856404';
21 $iconBg = '#856404bd';
22 }
23 ?>
24
25 <div>
26 <div style=" padding: 10px; border-radius: 5px;">
27 <div class="email-template-content"
28 style="font-family: Arial, Helvetica, sans-serif; max-width: 620px; margin: 0 auto; padding: 0px; width: 100%;">
29
30 <div
31 style="margin-bottom: 10px;background: <?php echo esc_attr($bgColor); ?>;padding: 30px 30px;border-radius: 4px;text-align: center;color: white;">
32 <?php if ($order->payment_status !== 'paid') : ?>
33 <div
34 style="width: 80px;height: 80px;border-radius: 50%;background: <?php echo esc_attr($iconBg); ?>;display: inline-flex ;align-items: center;justify-content: center;margin-bottom: 20px;">
35 <svg style="width: 40px;height: 40px;" class="w-64 h-64" xmlns="http://www.w3.org/2000/svg"
36 viewBox="0 0 1024 1024" fill="currentColor">
37 <path
38 d="M480 674V192c0-18 14-32 32-32s32 14 32 32v482h-64zm0 63h64v60h-64v-60zM0 512C0 229 229 0 512 0s512 229 512 512-229 512-512 512S0 795 0 512zm961 0c0-247-202-448-449-448S64 265 64 512s201 448 448 448 449-201 449-448z"></path>
39 </svg>
40 </div>
41 <h1 style="font-size: 2em;line-height: 1;margin: 0;font-weight: 700;color:<?php echo esc_attr($titleColor); ?>">
42 <?php echo esc_html__('Payment Pending!', 'fluent-cart'); ?>
43 </h1>
44
45 <?php else: ?>
46 <div
47 style="width: 80px;height: 80px;border-radius: 50%;background: <?php echo esc_attr($iconBg); ?>;display: inline-flex ;align-items: center;justify-content: center;margin-bottom: 20px;">
48 <svg style="width: 40px;height: 40px;" viewBox="0 0 24 24" fill="none" stroke="currentColor"
49 stroke-width="3" stroke-linecap="round" stroke-linejoin="round">
50 <polyline points="20,6 9,17 4,12"></polyline>
51 </svg>
52 </div>
53 <h1 style="font-size: 2em;line-height: 1;margin: 0;font-weight: 700;color:<?php echo esc_attr($titleColor); ?>">
54 <?php echo esc_html__('Purchase Successful!', 'fluent-cart'); ?>
55 </h1>
56 <?php endif; ?>
57 </div>
58
59 <div style="background-color: #fff; border-radius: 8px; border: 1px solid #e7eaee; ">
60 <div style="padding: 20px;">
61 <div style="overflow-x: hidden">
62 <div style="background-color: #ffffff; padding: 0px;">
63
64 <div class="no-print" style="margin-bottom: 16px;text-align: left; padding: 0;">
65 <p style="font-size: 24px;font-weight: 600;line-height: 1.2; margin: 0 0 4px 0; color: #2F3448;">
66 <?php
67 echo sprintf(
68 /* translators: %s is the customer's full name */
69 esc_html__('Hello %s!', 'fluent-cart'),
70 esc_html($order->customer->full_name)
71 );
72 ?>
73 </p>
74 <?php if ($order->payment_status === 'paid') : ?>
75 <p style="font-size: 14px; margin: 0; color: #2F3448;">
76 <?php
77 printf(
78 '%s<strong style="color: #007bff;"><a href="%s">#%s</a></strong>%s',
79 esc_html__('Your order ', 'fluent-cart'),
80 esc_url($profilePage . 'order/' . $order->uuid),
81 esc_html($order->invoice_no),
82 esc_html__(' has been placed successfully.', 'fluent-cart')
83 );
84 ?>
85 </p>
86 <?php else: ?>
87 <p style="font-size: 14px; margin: 0; color: #2F3448;">
88
89 <?php
90 printf(
91 '<strong style="color: #007bff;"><a href="%s">%s</a></strong> %s <a style="color: #007bff;" target="_blank" href="%s">%s</a>.',
92 esc_url($profilePage . 'order/' . $order->uuid),
93 esc_html__('Your order', 'fluent-cart'),
94 esc_html__('has payment due. You can pay from', 'fluent-cart'),
95 esc_url(\FluentCart\App\Services\Payments\PaymentHelper::getCustomPaymentLink($order->uuid)),
96 esc_html__('here', 'fluent-cart')
97 );
98 ?>
99
100 </p>
101 <?php endif; ?>
102
103 </div>
104
105 <!-- show tax content -->
106 <?php
107 $orderTaxRates = $order->getPrimaryOrderTaxRate();
108 if ($order->tax_total > 0 || $orderTaxRates): ?>
109 <div class="fct_invoice_tax_content" style="text-align: right;">
110 <?php
111 if ($orderTaxRates) {
112 $storeVatNumber = Arr::get($orderTaxRates->meta, 'store_vat_number', '');
113 $taxcountry = Arr::get($orderTaxRates->meta ?? [], 'tax_country', '');
114 if ($storeVatNumber !== '') {
115 echo '<p style="font-weight: 600; font-size: 14px;margin-bottom:12px;">' . esc_html(TaxModule::getCountryTaxTitle($taxcountry)) . ': ' . esc_html($storeVatNumber) . '</p>';
116 }
117 }
118 ?>
119 </div>
120 <?php endif; ?>
121
122
123
124 <?php if ($order->order_items) : ?>
125 <div>
126 <div
127 style="display: flex;justify-content: space-between;background: rgb(249,250,251);padding: 0 16px;">
128 <div
129 style="font-size: 12px;font-weight: 600;color: rgb(55, 65, 81);text-transform: uppercase;line-height: 24px;margin: 0;text-align: left;">
130 <?php echo esc_html__('Item', 'fluent-cart'); ?>
131 </div>
132 <div
133 style="width: 200px;text-align:right;font-size: 12px;font-weight: 600;color: rgb(55, 65, 81);text-transform: uppercase;line-height: 24px;margin: 0;">
134 <?php echo esc_html__('Total', 'fluent-cart'); ?>
135 </div>
136 </div>
137
138 <div>
139 <?php
140 $orderItems = $order->getProductItems()->toArray();
141 $transaction = $order->getLatestTransaction();
142
143 foreach ($orderItems as $item) :
144 ?>
145 <div
146 style="display: flex;align-items: flex-start;justify-content: space-between;padding: 8px 16px;">
147 <div>
148 <p style="font-size: 15px; color: #2F3448; font-weight: 500; overflow: hidden; line-height: 18px; margin-top: 0; margin-bottom: 5px;">
149 <?php echo esc_html($item['post_title']); ?>
150 <?php if ($item['quantity'] > 1): ?>
151 <span
152 style="font-size:12px;font-weight:400;color:rgb(75,85,99)">x <?php echo esc_html($item['quantity']); ?></span>
153 <?php endif; ?>
154 </p>
155 <p style="margin: 0; font-size: 14px; color: #758195; font-weight: 400; line-height: 15px;">
156 - <?php echo esc_html(!empty($item['variation_display_title']) ? $item['variation_display_title'] : $item['title']); ?>
157 </p>
158 <?php if ($item['payment_type'] === 'subscription' && !empty($item['payment_info'])): ?>
159 <p style="font-size:12px;color:rgb(75,85,99);line-height:20px;margin: 3px 0 0 0;">
160 <?php echo wp_kses_post($item['payment_info']) ?>
161 </p>
162 <?php endif; ?>
163 </div>
164 <div style="width: 200px;text-align: right;">
165 <div
166 style="font-size:14px;font-weight:700;color:rgb(17,24,39);margin:0;line-height:24px;">
167 <?php echo esc_html($item['formatted_total']); ?>
168 </div>
169 </div>
170 </div>
171 <?php endforeach; ?>
172
173 <div
174 style="margin: 16px 0 0; width: 100%; border-top: 1px solid #e5e7eb; padding-top: 12px;">
175 <?php if ($order->subtotal != $order->total_amount || $order->tax_total > 0): ?>
176 <div
177 style="display: flex;align-items: center; justify-content: space-between;">
178 <div
179 style="font-size:14px;color:rgb(55,65,81);line-height:24px;margin: 0;">
180 <?php echo esc_html__('Subtotal', 'fluent-cart'); ?>
181 </div>
182 <div
183 style="text-transform:uppercase;font-size:13px;color:rgb(55,65,81);margin:0;line-height:24px;text-align: right"><?php echo esc_html(Helper::toDecimal($order->subtotal)); ?></div>
184 </div>
185 <?php endif; ?>
186 <?php
187 $prorateCredit = (int) \FluentCart\Framework\Support\Arr::get($order->config, 'prorate_credit', 0);
188 $upgradeDiscount = $order->manual_discount_total - $prorateCredit;
189 // When the prorate credit IS the whole discount, label the row directly
190 // instead of showing "Discount" with a single redundant breakdown row.
191 $onlyProrateCredit = $prorateCredit > 0 && $upgradeDiscount <= 0 && $order->coupon_discount_total <= 0;
192 ?>
193 <?php if ($order->manual_discount_total + $order->coupon_discount_total > 0): ?>
194 <div
195 style="display: flex;align-items: center; justify-content: space-between;">
196 <div
197 style="font-size:14px;color:rgb(55,65,81);line-height:24px;margin: 0;">
198 <?php echo $onlyProrateCredit ? esc_html__('Prorate Credit', 'fluent-cart') : esc_html__('Discount', 'fluent-cart'); ?>
199 </div>
200 <div
201 style="text-transform:uppercase;font-size:13px;color:rgb(55,65,81);margin:0;line-height:24px;text-align: right">
202 - <?php echo esc_html(Helper::toDecimal($order->manual_discount_total + $order->coupon_discount_total)); ?>
203 </div>
204 </div>
205 <?php if ($prorateCredit > 0 && $upgradeDiscount > 0): ?>
206 <div style="display: flex;align-items: center; justify-content: space-between; padding-left: 12px;">
207 <div style="font-size:12px;color:rgb(107,114,128);line-height:20px;margin: 0;">
208 <?php echo esc_html__('Upgrade Discount', 'fluent-cart'); ?>
209 </div>
210 <div style="font-size:12px;color:rgb(107,114,128);margin:0;line-height:20px;text-align: right">
211 <?php echo esc_html(Helper::toDecimal($upgradeDiscount)); ?>
212 </div>
213 </div>
214 <?php endif; ?>
215 <?php if ($prorateCredit > 0 && !$onlyProrateCredit): ?>
216 <div style="display: flex;align-items: center; justify-content: space-between; padding-left: 12px;">
217 <div style="font-size:12px;color:rgb(107,114,128);line-height:20px;margin: 0;">
218 <?php echo esc_html__('Prorate Credit', 'fluent-cart'); ?>
219 </div>
220 <div style="font-size:12px;color:rgb(107,114,128);margin:0;line-height:20px;text-align: right">
221 <?php echo esc_html(Helper::toDecimal($prorateCredit)); ?>
222 </div>
223 </div>
224 <?php endif; ?>
225 <?php endif; ?>
226 <?php if ($order->shipping_total > 0): ?>
227 <div
228 style="display: flex;align-items: center; justify-content: space-between;">
229 <div
230 style="font-size:14px;color:rgb(55,65,81);line-height:24px;margin: 0;">
231 <?php echo esc_html__('Shipping', 'fluent-cart'); ?>
232 </div>
233 <div
234 style="text-transform:uppercase;font-size:13px;color:rgb(55,65,81);margin:0;line-height:24px;text-align: right"><?php echo esc_html(Helper::toDecimal($order->shipping_total)); ?></div>
235 </div>
236 <?php endif; ?>
237 <?php
238 $feeItems = $order->feeItems()->get();
239 foreach ($feeItems as $feeItem): ?>
240 <div
241 style="display: flex;align-items: center; justify-content: space-between;">
242 <div
243 style="font-size:14px;color:rgb(55,65,81);line-height:24px;margin: 0;">
244 <?php echo esc_html($feeItem->title); ?>
245 </div>
246 <div
247 style="text-transform:uppercase;font-size:13px;color:rgb(55,65,81);margin:0;line-height:24px;text-align: right"><?php echo esc_html(Helper::toDecimal($feeItem->subtotal)); ?></div>
248 </div>
249 <?php endforeach; ?>
250 </div><!-- /Zone A: full-width subtotal/shipping/fees -->
251 <?php if ($order->isReverseChargeTaxOrder() || $order->tax_total > 0): ?>
252 <div
253 style="background-color:rgb(249,250,251);padding:16px;border-radius:8px;margin: 12px 0 0 auto; width: 100%;max-width: 400px;">
254 <?php if ($order->isReverseChargeTaxOrder()): ?>
255 <?php
256 $rcReversedTotal = $order->getReversedTaxTotal();
257 $rcChargeLabel = $rcReversedTotal > 0
258 ? sprintf(
259 /* translators: %1$s: formatted reversed tax amount */
260 __('Tax reversed: %1$s', 'fluent-cart'),
261 Helper::toDecimal($rcReversedTotal)
262 )
263 : __('Charge reversed', 'fluent-cart');
264 ?>
265 <div
266 style="display: flex;align-items: center; justify-content: space-between;">
267 <div
268 style="font-size:14px;color:rgb(55,65,81);line-height:24px;margin: 0;">
269 <?php echo esc_html__('Tax', 'fluent-cart'); ?>
270 </div>
271 <div
272 style="text-transform:uppercase;font-size:13px;color:rgb(55,65,81);margin:0;line-height:24px;text-align: right">
273 <?php echo esc_html($rcChargeLabel); ?>
274 </div>
275 </div>
276 <?php elseif ($order->tax_total > 0): ?>
277 <?php
278 $thankYouTaxSummary = TaxSummaryHelper::computeTaxSummary($order);
279 $tyFoldedRateLines = Arr::get($thankYouTaxSummary, 'foldedRateLines', []);
280 $tyIncludedInPrices = (int) Arr::get($thankYouTaxSummary, 'includedInPrices', 0);
281 $tyPayableTax = (int) Arr::get($thankYouTaxSummary, 'payableTax', 0);
282 $tyTotalOrderTax = (int) Arr::get($thankYouTaxSummary, 'totalOrderTax', 0);
283 ?>
284 <?php if (!empty($tyFoldedRateLines)): ?>
285 <div style="font-size:11px;text-transform:uppercase;letter-spacing:0.04em;color:#94a3b8;font-weight:600;margin-bottom:4px;">
286 <?php esc_html_e('Tax breakdown by rate', 'fluent-cart'); ?>
287 </div>
288 <div style="display:grid;grid-template-columns:minmax(0,1fr) 92px 64px;column-gap:12px;align-items:start;margin-bottom:4px;">
289 <div style="font-size:11px;text-transform:uppercase;color:rgb(107,114,128);line-height:20px;margin:0;font-weight:600;min-width:0;">
290 <?php echo esc_html__('Rate', 'fluent-cart'); ?>
291 </div>
292 <div style="font-size:11px;text-transform:uppercase;color:rgb(107,114,128);line-height:20px;margin:0;font-weight:600;text-align:right;white-space:nowrap;">
293 <?php echo esc_html__('Taxable base', 'fluent-cart'); ?>
294 </div>
295 <div style="font-size:11px;text-transform:uppercase;color:rgb(107,114,128);line-height:20px;margin:0;font-weight:600;text-align:right;white-space:nowrap;">
296 <?php echo esc_html__('Tax', 'fluent-cart'); ?>
297 </div>
298 </div>
299 <?php foreach ($tyFoldedRateLines as $tyFoldedLine): ?>
300 <?php $tyMutedStyle = !empty($tyFoldedLine['inclusive']) ? 'opacity:0.7;' : ''; ?>
301 <div style="display:grid;grid-template-columns:minmax(0,1fr) 92px 64px;column-gap:12px;align-items:start;<?php echo esc_attr($tyMutedStyle); ?>">
302 <div style="font-size:14px;color:rgb(55,65,81);line-height:20px;margin:0;min-width:0;white-space:normal;overflow-wrap:anywhere;word-break:break-word;">
303 <?php echo esc_html($tyFoldedLine['label']); ?>
304 </div>
305 <div style="font-size:13px;color:rgb(107,114,128);line-height:20px;margin:0;text-align:right;white-space:nowrap;">
306 <?php echo esc_html(Helper::toDecimal($tyFoldedLine['base'])); ?>
307 </div>
308 <div style="text-transform:uppercase;font-size:13px;color:rgb(55,65,81);margin:0;line-height:20px;text-align:right;white-space:nowrap;">
309 <?php echo esc_html(Helper::toDecimal($tyFoldedLine['tax'])); ?>
310 </div>
311 </div>
312 <?php endforeach; ?>
313 <div style="display:flex;align-items:center;justify-content:space-between;margin-top:6px;border-top:1px solid #e2e8f0;padding-top:6px;">
314 <div style="font-size:14px;font-weight:700;color:rgb(55,65,81);line-height:24px;margin:0;">
315 <?php echo esc_html__('Total tax', 'fluent-cart'); ?>
316 </div>
317 <div style="text-transform:uppercase;font-size:13px;font-weight:700;color:rgb(55,65,81);margin:0;line-height:24px;text-align:right;">
318 <?php echo esc_html(Helper::toDecimal($tyTotalOrderTax)); ?>
319 </div>
320 </div>
321 <?php if ($tyIncludedInPrices > 0): ?>
322 <div style="display:flex;align-items:center;justify-content:space-between;">
323 <div style="font-size:13px;color:rgb(107,114,128);line-height:24px;margin:0;">
324 <?php echo esc_html__('of which included in prices', 'fluent-cart'); ?>
325 </div>
326 <div style="text-transform:uppercase;font-size:13px;color:rgb(107,114,128);margin:0;line-height:24px;text-align:right;">
327 <?php echo esc_html(Helper::toDecimal($tyIncludedInPrices)); ?>
328 </div>
329 </div>
330 <?php endif; ?>
331 <?php if ($tyPayableTax > 0 && $tyIncludedInPrices > 0): ?>
332 <div style="display:flex;align-items:center;justify-content:space-between;border-top:1px solid #e2e8f0;padding-top:6px;margin-top:6px;">
333 <div style="font-size:14px;font-weight:700;color:rgb(55,65,81);line-height:24px;margin:0;">
334 <?php echo esc_html__('Payable now (added)', 'fluent-cart'); ?>
335 </div>
336 <div style="text-transform:uppercase;font-size:13px;font-weight:700;color:rgb(55,65,81);margin:0;line-height:24px;text-align:right;">
337 <?php echo esc_html(Helper::toDecimal($tyPayableTax)); ?>
338 </div>
339 </div>
340 <?php endif; ?>
341 <?php else: ?>
342 <?php $thankYouTaxLines = Arr::get($thankYouTaxSummary, 'taxRateLines', []); ?>
343 <?php if (!empty($thankYouTaxLines)): ?>
344 <?php foreach ($thankYouTaxLines as $thankYouTaxLine): ?>
345 <div
346 style="display: flex;align-items: center; justify-content: space-between;">
347 <div
348 style="font-size:14px;color:rgb(55,65,81);line-height:24px;margin: 0;">
349 <?php echo esc_html($thankYouTaxLine['label']); ?>
350 </div>
351 <div
352 style="text-transform:uppercase;font-size:13px;color:rgb(55,65,81);margin:0;line-height:24px;text-align: right">
353 <?php echo esc_html(Helper::toDecimal($thankYouTaxLine['order_tax'])); ?>
354 </div>
355 </div>
356 <?php endforeach; ?>
357 <?php else: ?>
358 <div
359 style="display: flex;align-items: center; justify-content: space-between;">
360 <div
361 style="font-size:14px;color:rgb(55,65,81);line-height:24px;margin: 0;">
362 <?php echo esc_html__('Total Tax', 'fluent-cart'); ?>
363 <?php echo \FluentCart\App\Helpers\Helper::getOrderTaxLabel($order); ?>
364 </div>
365 <div
366 style="text-transform:uppercase;font-size:13px;color:rgb(55,65,81);margin:0;line-height:24px;text-align: right">
367 <?php echo esc_html(Helper::toDecimal($order->tax_total)); ?>
368 </div>
369 </div>
370 <?php endif; ?>
371 <?php if ($order->shipping_tax > 0): ?>
372 <?php
373 $thankYouShippingTaxLines = Arr::get($thankYouTaxSummary, 'shippingTaxLines', []);
374 ?>
375 <?php if (!empty($thankYouShippingTaxLines)): ?>
376 <?php foreach ($thankYouShippingTaxLines as $thankYouShippingTaxLine): ?>
377 <div
378 style="display: flex;align-items: center; justify-content: space-between;">
379 <div
380 style="font-size:14px;color:rgb(55,65,81);line-height:24px;margin: 0;">
381 <?php echo esc_html($thankYouShippingTaxLine['label']); ?>
382 </div>
383 <div
384 style="text-transform:uppercase;font-size:13px;color:rgb(55,65,81);margin:0;line-height:24px;text-align: right">
385 <?php echo esc_html(Helper::toDecimal($thankYouShippingTaxLine['shipping_tax'])); ?>
386 </div>
387 </div>
388 <?php endforeach; ?>
389 <?php else: ?>
390 <div
391 style="display: flex;align-items: center; justify-content: space-between;">
392 <div
393 style="font-size:14px;color:rgb(55,65,81);line-height:24px;margin: 0;">
394 <?php echo esc_html__('Shipping Tax', 'fluent-cart'); ?>
395 <?php echo \FluentCart\App\Helpers\Helper::getOrderTaxLabel($order); ?>
396 </div>
397 <div
398 style="text-transform:uppercase;font-size:13px;color:rgb(55,65,81);margin:0;line-height:24px;text-align: right">
399 <?php echo esc_html(Helper::toDecimal($order->shipping_tax)); ?>
400 </div>
401 </div>
402 <?php endif; ?>
403 <?php endif; ?>
404 <?php endif; ?>
405 <?php endif; ?>
406 </div><!-- /tax breakdown box -->
407 <?php endif; ?>
408 <div style="width: 100%; margin-top: 12px; border-top: 1px solid #e5e7eb; padding-top: 12px;"><!-- Zone C: full-width total/payment -->
409
410 <?php if ($order->total_refund > 0): ?>
411 <div
412 style="display: flex;align-items: center; justify-content: space-between;">
413 <div
414 style="font-size:14px;color:rgb(55,65,81);line-height:24px;margin: 0;">
415 <?php echo esc_html__('Refund', 'fluent-cart'); ?>
416 </div>
417 <div
418 style="text-transform:uppercase;font-size:13px;color:rgb(55,65,81);margin:0;line-height:24px;text-align: right">
419 - <?php echo esc_html(Helper::toDecimal($order->total_refund)); ?>
420 </div>
421 </div>
422 <?php endif; ?>
423 <div
424 style="display: flex;align-items: center; justify-content: space-between;">
425 <div
426 style="font-size:16px;font-weight:700;color:rgb(55,65,81);line-height:24px;margin: 0;">
427 <?php echo esc_html__('Total', 'fluent-cart'); ?>
428 </div>
429 <div
430 style="text-transform:uppercase;font-size:14px;font-weight:700;color:rgb(55,65,81);margin:0;line-height:24px;text-align: right">
431 <?php echo esc_html(Helper::toDecimal($order->total_amount - $order->total_refund)); ?>
432 </div>
433 </div>
434 <div
435 style="display: flex;align-items: center; justify-content: space-between;">
436 <div
437 style="font-size:14px;color:rgb(55,65,81);line-height:24px;margin: 0;">
438 <?php echo esc_html__('Payment Method', 'fluent-cart'); ?>
439 </div>
440 <div
441 style="text-transform:uppercase;font-size:13px;color:rgb(55,65,81);margin:0;line-height:24px;text-align: right">
442 <?php if ($transaction->card_last_4) :
443 echo esc_html($transaction->card_brand) . ' ' . esc_html($transaction->card_last_4);
444 else:
445 echo esc_html($transaction->payment_method);
446 endif; ?>
447 </div>
448 </div>
449 </div>
450
451 <!-- tax note -->
452 <?php
453 if($order->isReverseChargeTaxOrder()): ?>
454
455 <div style="text-align: right; font-size: 14px; margin-top: 10px;">
456 <?php echo '*' . esc_html__('Tax to be paid on reverse charge basis', 'fluent-cart'); ?>
457 </div>
458
459 <?php endif ?>
460
461
462 </div>
463 </div>
464 <?php endif; ?>
465
466 <?php
467
468 App::make('view')->render('invoice.parts.subscription_items', [
469 'subscriptions' => $order->subscriptions,
470 'order' => $order
471 ])
472 ?>
473
474 <?php
475 $downloads = $order->getDownloads();
476 $licenses = $order->getLicenses();
477 if ($downloads) {
478 \FluentCart\App\App::make('view')->render('emails.parts.downloads', [
479 'order' => $order,
480 'heading' => 'Downloads',
481 'downloadItems' => $downloads ?: [],
482 'show_notice' => false
483 ]);
484 }
485
486 if ($licenses && $licenses->count() > 0) {
487 \FluentCart\App\App::make('view')->render('emails.parts.licenses', [
488 'licenses' => $licenses,
489 'heading' => 'Licenses',
490 'show_notice' => false
491 ]);
492 }
493 ?>
494
495 <?php if ($order->fulfillment_type === 'physical') : ?>
496 <div
497 class="fct-thank-you-page-order-items-addresses"
498 style="display: grid;grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));gap: 20px;margin-top: 20px;">
499
500 <div class="fct-thank-you-page-order-items-addresses-bill-to" style="font-size:14px;border-radius: 5px;">
501 <h5 style="font-weight: bold;font-size: 14px;margin: 0 0 10px 0;color: #495057;border-bottom: 1px solid #dee2e6;padding-bottom: 5px;">
502 <?php echo esc_html__('Bill To', 'fluent-cart'); ?>
503 </h5>
504 <?php
505 if (!empty($order->billing_address)) :
506 ?>
507 <div
508 class="fct-thank-you-page-order-items-addresses-bill-to-address"
509 style="margin-bottom: 3px;">
510 <?php echo esc_html($order->billing_address->getAddressAsText()); ?>
511 </div>
512
513 <div
514 class="fct-thank-you-page-order-items-addresses-bill-to-email"
515 style="margin-top: 10px;">
516 <?php echo esc_html($order->customer->email); ?>
517 </div>
518 <?php else: ?>
519 <div
520 class="fct-thank-you-page-order-items-addresses-bill-to-name"
521 style="margin-top: 10px;">
522 <?php echo esc_html($order->customer->full_name); ?>
523 </div>
524 <div
525 class="fct-thank-you-page-order-items-addresses-bill-to-email"
526 style="margin-top: 3px;">
527 <?php echo esc_html($order->customer->email); ?>
528 </div>
529 <?php endif; ?>
530 <?php
531 $phoneNumber = Arr::get($order->billing_address->meta ?? [], 'other_data.phone', '');
532 if ($phoneNumber !== ''):
533 ?>
534 <div class="fct-thank-you-page-order-items-addresses-bill-to-phone">
535 <?php echo esc_html($phoneNumber); ?>
536 </div>
537 <?php endif; ?>
538 <div class="fct-thank-you-page-order-items-addresses-bill-to-company-name">
539 <?php
540 $companyName = Arr::get($order->billing_address->meta ?? [], 'other_data.company_name', '');
541
542 if ($companyName === '') {
543 $companyName = $order->getCustomerTaxName();
544 }
545 echo esc_html($companyName);
546 ?>
547 </div>
548 <div class="fct-thank-you-page-order-items-addresses-bill-to-vat-number">
549 <?php
550 $vatNumber = $order->getCustomerTaxNumber();
551 if ($vatNumber !== '') {
552 $vatLabel = __('VAT/Tax ID', 'fluent-cart');
553 echo esc_html($vatLabel) . ': ' . esc_html($vatNumber);
554 }
555 ?>
556 </div>
557 <?php
558 $reverseChargeDeclaration = Arr::get($order->getBusinessInfo(), 'reverse_charge_declaration', '');
559 if ($reverseChargeDeclaration !== ''):
560 ?>
561 <div class="fct-thank-you-page-order-items-addresses-bill-to-vat-number">
562 <strong><?php echo esc_html__('Reverse Charge Declaration', 'fluent-cart'); ?>:</strong>
563 <?php echo esc_html($reverseChargeDeclaration); ?>
564 </div>
565 <?php endif; ?>
566 </div>
567 <div
568 class="fct-thank-you-page-order-items-addresses-ship-to"
569 style="font-size:14px;border-radius: 5px;">
570 <h5 class="fct-thank-you-page-order-items-addresses-ship-to-title" style="font-weight: bold;font-size: 14px;margin: 0 0 10px 0;color: #495057;border-bottom: 1px solid #dee2e6;padding-bottom: 5px;">
571 <?php echo esc_html__('Ship To', 'fluent-cart'); ?>
572 </h5>
573 <?php if (!empty($order->shipping_address)) : ?>
574 <div
575 class="fct-thank-you-page-order-items-addresses-ship-to-address"
576 style="margin-bottom: 3px;">
577 <?php echo esc_html($order->shipping_address->getAddressAsText()); ?>
578 </div>
579 <!-- show phone number -->
580 <?php
581 $phone = Arr::get($order->shipping_address->meta ?? [], 'other_data.phone', '');
582 if ($phone !== ''):?>
583 <div class="fct-thank-you-page-order-items-addresses-ship-to-phone">
584 <?php echo esc_html($phone); ?>
585 </div>
586 <?php endif; ?>
587 <?php else: ?>
588 <div
589 class="fct-thank-you-page-order-items-addresses-ship-to-name"
590 style="margin-top: 10px;">
591 <?php echo esc_html($order->customer->full_name); ?>
592 </div>
593 <div
594 class="fct-thank-you-page-order-items-addresses-ship-to-email"
595 style="margin-top: 3px;">
596 <?php echo esc_html($order->customer->email); ?>
597 </div>
598 <?php endif; ?>
599 </div>
600 </div>
601 <?php endif; ?>
602
603 </div>
604 </div>
605 </div>
606 </div>
607
608 </div>
609 <?php
610 // include(__DIR__ . '/../emails/components/cta.php')
611 ?>
612 </div>
613 </div>
614
615 <?php if (!empty($order)): ?>
616 <div style="text-align: center;margin-top: 10px;display: flex;align-items: center;justify-content: center;gap: 10px;">
617 <a href="<?php echo esc_url($profilePage . 'order/' . $order->uuid); ?>"
618 style="background: var(--fluent-cart-primary-color, #253241); color: #fff; padding: 7px 20px; border-radius: 8px; border: none; font-size: 16px; font-weight: 500; text-decoration:none;display:inline-block;">
619 <?php echo esc_html__('View Order', 'fluent-cart'); ?>
620 </a>
621 <a href="<?php echo esc_url(\FluentCart\App\Services\URL::appendQueryParams(
622 home_url(),
623 [
624 'fluent-cart' => 'receipt',
625 'order_hash' => esc_attr($order->uuid),
626 'download' => 1
627 ]
628 )) ?>"
629 style="background: var(--fluent-cart-primary-color, #253241);font-size:14px;color:#000;background: none;font-weight: 600;display:inline-block;">
630 <?php echo esc_html__('Download Receipt', 'fluent-cart'); ?>
631 </a>
632 </div>
633
634 <?php do_action('fluent_cart/after_receipt', [
635 'order' => $order,
636 'is_first_time' => $is_first_time ?? false,
637 'order_operation' => $order_operation ?? null
638 ]); ?>
639
640 <?php
641 if (!empty($is_first_time)) {
642 do_action('fluent_cart/after_receipt_first_time', [
643 'order' => $order,
644 'order_operation' => $order_operation ?? null
645 ]);
646 }
647 ?>
648 <?php endif; ?>
649