PluginProbe ʕ •ᴥ•ʔ
VikAppointments Services Booking Calendar / 1.2.21
VikAppointments Services Booking Calendar v1.2.21
1.2.21 1.2.20 trunk 1.2.17 1.2.18 1.2.19
vikappointments / site / helpers / mail_tmpls / packages_email_tmpl.php
vikappointments / site / helpers / mail_tmpls Last commit date
admin_email_tmpl.php 6 days ago cancellation_email_tmpl.php 6 days ago customer_email_tmpl.php 6 days ago employee_email_tmpl.php 6 days ago index.html 6 days ago packages_email_tmpl.php 6 days ago stock_email_tmpl.php 6 days ago waitlist_email_tmpl.php 6 days ago
packages_email_tmpl.php
231 lines
1 <?php
2 /**
3 * @package VikAppointments
4 * @subpackage core
5 * @author E4J s.r.l.
6 * @copyright Copyright (C) 2021 E4J s.r.l. All Rights Reserved.
7 * @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
8 * @link https://vikwp.com
9 */
10
11 // No direct access
12 defined('ABSPATH') or die('No script kiddies please!');
13
14 /**
15 * VikAppointments - Packages E-Mail Template.
16 *
17 * @var object $order It is possible to use this variable to
18 * access the details of the order.
19 *
20 * @see the bottom of the page to check the available TAGS to use.
21 */
22
23 $config = VAPFactory::getConfig();
24 $currency = VAPFactory::getCurrency();
25
26 ?>
27
28 <style>
29 @media print {
30 .no-printable {
31 display: none;
32 }
33 }
34 </style>
35
36 <div style="background:#fff; color: #666; width: 100%; table-layout: fixed;">
37 <div style="max-width: 600px; margin:0 auto;">
38
39 <!--[if (gte mso 9)|(IE)]>
40 <table width="800" align="center">
41 <tr>
42 <td>
43 <![endif]-->
44
45 <table align="center" style="margin: 0 auto; width: 100%; max-width: 600px; border-spacing: 0; font-family: sans-serif;">
46
47 <!-- TOP BOX [company logo and name] -->
48
49 <tr>
50 <td style="padding: 0; text-align: center;">
51 <div style="display: inline-block; float: left;">{logo}</div>
52 <h3 style="display: inline-block; float: right;">{company_name}</h3>
53 </td>
54 </tr>
55
56 <!-- ORDER NUMBER AND ORDER KEY -->
57
58 <tr>
59 <td style="padding: 0; text-align: center;">
60 <table width="100%" style="border-spacing: 0; margin: 10px auto 0; font-size: 14px; background: #f2f3f7;">
61 <tr>
62 <td style="padding: 20px 10px; line-height: 1.4em; text-align: left;">
63 <?php echo JText::translate('VAPORDERNUMBER'); ?>: {order_number}
64 </td>
65 <td style="padding: 20px 10px; line-height: 1.4em; text-align: right;">
66 {order_key}
67 </td>
68 </tr>
69 </table>
70 </td>
71 </tr>
72
73 <!-- ORDER STATUS -->
74
75 <tr>
76 <td style="padding: 0; text-align: center;">
77 <table width="100%" style="border-spacing: 0; margin: 10px auto 0; font-size: 14px; background: #f2f3f7;">
78 <tr>
79 <td style="padding: 20px 10px; line-height: 1.4em; text-align: left;">
80 <span style="text-transform:uppercase; font-weight:bold;">
81 {order_status}
82 </span>
83 </td>
84 </tr>
85 </table>
86 </td>
87 </tr>
88
89 <!-- TOTAL COST AND PAYMENT GATEWAY -->
90
91 <?php
92 if ($order->totals->gross > 0)
93 {
94 ?>
95 <tr>
96 <td style="padding: 0; text-align: center;">
97 <table width="100%" style="border-spacing: 0; margin: 10px auto 0; font-size: 14px; background: #f2f3f7;">
98 <tr>
99 <td style="padding: 20px 10px; line-height: 1.4em; text-align: left;">
100 <div style="float:left; display:inline-block;">
101 <?php
102 if ($order->payment)
103 {
104 // show payment name
105 ?>
106 {order_payment}
107 <?php
108 }
109 else
110 {
111 // show grand total label
112 echo JText::translate('VAPORDERDEPOSIT');
113 }
114 ?>
115 </div>
116
117 <div style="float:right; display:inline-block;">{order_total_cost}</div>
118 </td>
119 </tr>
120 </table>
121 </td>
122 </tr>
123 <?php
124 }
125 ?>
126
127 <!-- ITEMS LIST -->
128
129 <?php
130 foreach ($order->packages as $p)
131 {
132 ?>
133 <tr>
134 <td style="padding: 0; text-align: center;">
135 <table width="100%" style="border-spacing: 0; margin: 10px auto 0; font-size: 14px; background: #f2f3f7;">
136 <tr>
137 <td style="line-height: 1.4em; text-align: left; display: flex; flex-wrap: wrap;">
138 <div style="display: inline-block; width: 100%; padding: 10px; box-sizing: border-box; background: #f8f8f8; flex: 100%;">
139 <div style="float:left; display: inline-block; width: 100%;">
140 <?php echo $p->name; ?> - <?php echo JText::sprintf('VAPPACKAGESMAILAPP', $p->totalApp); ?>
141 <span style="margin-left: 10px; float: right;">x<?php echo $p->quantity; ?></span>
142 </div>
143 </div>
144
145 <?php
146 if ($p->totals->gross > 0)
147 {
148 ?>
149 <div style="background: #eee; border-top: 1px solid #ddd; padding: 10px; text-align: right; flex: 100%;">
150 <?php echo $currency->format($p->totals->gross); ?>
151 </div>
152 <?php
153 }
154 ?>
155 </td>
156 </tr>
157 </table>
158 </td>
159 </tr>
160 <?php
161 }
162 ?>
163
164 <!-- CUSTOMER DETAILS -->
165
166 <tr>
167 <td style="padding: 0; text-align: center;">
168 <table width="100%" style="border-spacing: 0; margin: 10px auto 0; padding: 0; font-size: 14px; background: #f2f3f7;">
169 <tr>
170 <td style="padding: 0; line-height: 1.4em; text-align: left;">
171 <div style="background: #eee; border-bottom: 1px solid #ddd; padding: 10px;"><?php echo JText::translate('VAPPERSONALDETAILS'); ?></div>
172 <div style="padding: 10px; background-color: #f2f3f7;">
173 <?php
174 foreach ($order->displayFields as $label => $value)
175 {
176 ?>
177 <div style="padding: 2px 0;">
178 <div style="display: inline-block; width: 180px;"><?php echo $label; ?></div>
179 <div style="display: inline-block;"><?php echo $value; ?></div>
180 </div>
181 <?php
182 }
183 ?>
184 </div>
185 </td>
186 </tr>
187 </table>
188 </td>
189 </tr>
190
191 <!-- ORDER LINK -->
192
193 <tr class="no-printable">
194 <td style="padding: 0; text-align: center;">
195 <table width="100%" style="border-spacing: 0; margin: 10px auto 0; padding: 0; font-size: 14px; background: #f2f3f7;">
196 <tr>
197 <td style="padding: 0; line-height: 1.4em; text-align: left;">
198 <div style="background: #eee; border-bottom: 1px solid #ddd; padding: 10px;"><?php echo JText::translate('VAPORDERLINK'); ?></div>
199 <div style="padding: 10px; background-color: #f2f3f7;">
200 <a href="{order_link}" target="_blank" style="word-break: break-word;">{order_link}</a>
201 </div>
202 </td>
203 </tr>
204 </table>
205 </td>
206 </tr>
207
208 </table>
209
210 <!--[if (gte mso 9)|(IE)]>
211 </td>
212 </tr>
213 </table>
214 <![endif]-->
215
216 </div>
217 </div>
218
219 <?php
220 /**
221 * @var string|null {logo} The logo image of your company. Null if not specified.
222 * @var int {order_number} The unique ID of the reservation.
223 * @var string {order_key} The serial key of the reservation.
224 * @var string {order_status} The status of the order.
225 * @var string|null {order_payment} The name of the payment processor selected, otherwise NULL.
226 * @var string|null {order_payment_notes} The notes of the payment processor selected, otherwise NULL.
227 * @var float {order_total_cost} The total cost of the order.
228 * @var string {order_link} The direct url to the page of the order.
229 * @var string|null {company_name} The name of the company.
230 */
231