admin_email_tmpl.php
5 days ago
cancellation_email_tmpl.php
5 days ago
customer_email_tmpl.php
5 days ago
employee_email_tmpl.php
5 days ago
index.html
5 days ago
packages_email_tmpl.php
5 days ago
stock_email_tmpl.php
5 days ago
waitlist_email_tmpl.php
5 days ago
admin_email_tmpl.php
463 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 - Administrator 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 | <!-- HEADING TITLE --> |
| 48 | |
| 49 | <tr> |
| 50 | <td style="padding: 0;"> |
| 51 | <h3 style="display: inline-block;"><?php echo JText::translate('VAPADMINEMAILHEADTITLE'); ?></h3> |
| 52 | </td> |
| 53 | </tr> |
| 54 | |
| 55 | <!-- CUSTOM POSITION TOP --> |
| 56 | |
| 57 | <tr> |
| 58 | <td style="padding: 0;"> |
| 59 | {custom_position_top} |
| 60 | </td> |
| 61 | </tr> |
| 62 | |
| 63 | <!-- ORDER NUMBER, ORDER KEY AND STATUS --> |
| 64 | |
| 65 | <tr> |
| 66 | <td style="padding: 0; text-align: center;"> |
| 67 | <table width="100%" style="border-spacing: 0; margin: 10px auto 0; font-size: 14px; background: #f2f3f7;"> |
| 68 | <tr> |
| 69 | <td style="padding: 20px 10px; line-height: 1.4em; text-align: left;"> |
| 70 | <div style="float:left; display:inline-block;"> |
| 71 | {order_number} - {order_key} |
| 72 | </div> |
| 73 | <div style="float:right; display:inline-block;"> |
| 74 | <span style="text-transform:uppercase; font-weight:bold;"> |
| 75 | {order_status} |
| 76 | </span> |
| 77 | </div> |
| 78 | </td> |
| 79 | </tr> |
| 80 | </table> |
| 81 | </td> |
| 82 | </tr> |
| 83 | |
| 84 | <!-- TOTAL COST AND PAYMENT GATEWAY --> |
| 85 | |
| 86 | <?php |
| 87 | if ($order->totals->gross > 0) |
| 88 | { |
| 89 | ?> |
| 90 | <tr> |
| 91 | <td style="padding: 0; text-align: center;"> |
| 92 | <table width="100%" style="border-spacing: 0; margin: 10px auto 0; font-size: 14px; background: #f2f3f7;"> |
| 93 | <tr> |
| 94 | <td style="padding: 20px 10px; line-height: 1.4em; text-align: left;"> |
| 95 | <div style="float:left; display:inline-block;"> |
| 96 | <?php |
| 97 | if ($order->payment) |
| 98 | { |
| 99 | // show payment name |
| 100 | ?> |
| 101 | {order_payment} |
| 102 | <?php |
| 103 | } |
| 104 | else |
| 105 | { |
| 106 | // show grand total label |
| 107 | echo JText::translate('VAPORDERDEPOSIT'); |
| 108 | } |
| 109 | ?> |
| 110 | </div> |
| 111 | |
| 112 | <div style="float:right; display:inline-block;">{order_total_cost}</div> |
| 113 | </td> |
| 114 | </tr> |
| 115 | </table> |
| 116 | </td> |
| 117 | </tr> |
| 118 | <?php |
| 119 | } |
| 120 | ?> |
| 121 | |
| 122 | <!-- COUPON CODE --> |
| 123 | |
| 124 | <?php |
| 125 | if (!empty($order->coupon)) |
| 126 | { |
| 127 | ?> |
| 128 | <tr> |
| 129 | <td style="padding: 0; text-align: center;"> |
| 130 | <table width="100%" style="border-spacing: 0; margin: 10px auto 0; font-size: 14px; background: #f2f3f7;"> |
| 131 | <tr> |
| 132 | <td style="padding: 20px 10px; line-height: 1.4em; text-align: left;"> |
| 133 | <div style="float:left; display:inline-block;"> |
| 134 | <?php echo JText::translate('VAPORDERCOUPON'); ?> |
| 135 | </div> |
| 136 | <div style="float:right; display:inline-block;"> |
| 137 | {order_coupon_code} |
| 138 | </div> |
| 139 | </td> |
| 140 | </tr> |
| 141 | </table> |
| 142 | </td> |
| 143 | </tr> |
| 144 | <?php |
| 145 | } |
| 146 | ?> |
| 147 | |
| 148 | <!-- CUSTOM POSITION MIDDLE --> |
| 149 | |
| 150 | <tr> |
| 151 | <td style="padding: 0; text-align: center;"> |
| 152 | <table width="100%" style="border-spacing: 0; margin: 0 auto"> |
| 153 | <tr> |
| 154 | <td> |
| 155 | {custom_position_middle} |
| 156 | </td> |
| 157 | </tr> |
| 158 | </table> |
| 159 | </td> |
| 160 | </tr> |
| 161 | |
| 162 | <!-- APPOINTMENTS BOX --> |
| 163 | |
| 164 | <?php |
| 165 | foreach ($order->appointments as $row) |
| 166 | { |
| 167 | ?> |
| 168 | <tr> |
| 169 | <td style="padding: 0; text-align: center;"> |
| 170 | <table width="100%" style="border-spacing: 0; margin: 10px auto 0; font-size: 14px; background: #f2f3f7;"> |
| 171 | |
| 172 | <tr> |
| 173 | <td style="padding: 0; line-height: 1.4em; text-align: left;"> |
| 174 | <div> |
| 175 | |
| 176 | <div style="padding: 10px; border-bottom: 0; background-color: #f8f8f8;"> |
| 177 | <?php |
| 178 | echo $row->service->name; |
| 179 | |
| 180 | /** |
| 181 | * Display number of participants if higher than 1. |
| 182 | * |
| 183 | * @since 1.6.3 |
| 184 | */ |
| 185 | if ($row->people > 1) |
| 186 | { |
| 187 | echo ' x' . $row->people . ' '; |
| 188 | } |
| 189 | |
| 190 | echo ' - ' . $row->employee->name; |
| 191 | ?> |
| 192 | |
| 193 | <br /> |
| 194 | |
| 195 | <?php |
| 196 | // display check-in |
| 197 | echo $row->systemCheckin->lc; |
| 198 | |
| 199 | if ($config->getBool('multitimezone')) |
| 200 | { |
| 201 | // in case of multi-timezone, append offset |
| 202 | echo ' (' . $row->systemCheckin->timezone . ')'; |
| 203 | } |
| 204 | |
| 205 | // add duration |
| 206 | echo ' - ' . VikAppointments::formatMinutesToTime($row->duration); |
| 207 | |
| 208 | if ($row->location) |
| 209 | { |
| 210 | ?> |
| 211 | <br /> |
| 212 | <?php |
| 213 | |
| 214 | echo $row->location->text; |
| 215 | } |
| 216 | ?> |
| 217 | </div> |
| 218 | |
| 219 | <?php |
| 220 | if ($row->options) |
| 221 | { |
| 222 | ?> |
| 223 | <div style="border-top: 1px solid #ddd; padding: 10px; background-color: #eee;"> |
| 224 | <?php |
| 225 | foreach ($row->options as $opt) |
| 226 | { |
| 227 | ?> |
| 228 | <div style="padding: 2px 0; width: 100%; display: inline-block;"> |
| 229 | <div style="float: left; display: inline-block; text-align: left;"> |
| 230 | <?php |
| 231 | if ($opt->multiple || $opt->quantity > 1) |
| 232 | { |
| 233 | ?> |
| 234 | <small> |
| 235 | <?php echo $opt->quantity; ?>x |
| 236 | </small> |
| 237 | <?php |
| 238 | } |
| 239 | |
| 240 | echo $opt->fullName; |
| 241 | |
| 242 | if ($opt->duration) |
| 243 | { |
| 244 | ?> |
| 245 | <small style="margin-left: 10px; display: inline-block;"> |
| 246 | <?php echo '+' . VikAppointments::formatMinutesToTime($opt->duration->extraTotal); ?> |
| 247 | </small> |
| 248 | <?php |
| 249 | } |
| 250 | ?> |
| 251 | </div> |
| 252 | <?php |
| 253 | if ((float) $opt->totals->gross) |
| 254 | { |
| 255 | ?> |
| 256 | <div style="float: right; display: inline-block; text-align: right;"> |
| 257 | <?php echo $currency->format($opt->totals->gross); ?> |
| 258 | </div> |
| 259 | <?php |
| 260 | } |
| 261 | ?> |
| 262 | </div> |
| 263 | <?php |
| 264 | } |
| 265 | ?> |
| 266 | </div> |
| 267 | <?php |
| 268 | } |
| 269 | |
| 270 | if ($row->totals->grossOpt > 0) |
| 271 | { |
| 272 | ?> |
| 273 | <div style="border-top: 1px solid #ddd; padding: 5px 10px; text-align: right;"> |
| 274 | <span><?php echo $currency->format($row->totals->grossOpt); ?></span> |
| 275 | </div> |
| 276 | <?php |
| 277 | } |
| 278 | ?> |
| 279 | |
| 280 | </div> |
| 281 | </td> |
| 282 | </tr> |
| 283 | |
| 284 | </table> |
| 285 | </td> |
| 286 | </tr> |
| 287 | <?php |
| 288 | // end for |
| 289 | } |
| 290 | ?> |
| 291 | |
| 292 | <!-- CUSTOMER DETAILS --> |
| 293 | |
| 294 | <tr> |
| 295 | <td style="padding: 0; text-align: center;"> |
| 296 | <table width="100%" style="border-spacing: 0; margin: 10px auto 0; padding: 0; font-size: 14px; background: #f2f3f7;"> |
| 297 | <tr> |
| 298 | <td style="padding: 0; line-height: 1.4em; text-align: left;"> |
| 299 | <div style="background: #eee; border-bottom: 1px solid #ddd; padding: 10px;"><?php echo JText::translate('VAPPERSONALDETAILS'); ?></div> |
| 300 | <div style="padding: 10px; background-color: #f2f3f7;"> |
| 301 | <?php |
| 302 | foreach ($order->displayFields as $label => $value) |
| 303 | { |
| 304 | ?> |
| 305 | <div style="padding: 2px 0;"> |
| 306 | <div style="display: inline-block; width: 180px;"><?php echo $label; ?></div> |
| 307 | <div style="display: inline-block;"><?php echo $value; ?></div> |
| 308 | </div> |
| 309 | <?php |
| 310 | } |
| 311 | ?> |
| 312 | </div> |
| 313 | </td> |
| 314 | </tr> |
| 315 | </table> |
| 316 | </td> |
| 317 | </tr> |
| 318 | |
| 319 | <!-- ATTENDEES --> |
| 320 | |
| 321 | <?php |
| 322 | if ($order->attendees) |
| 323 | { |
| 324 | ?> |
| 325 | <tr> |
| 326 | <td style="padding: 0; text-align: center;"> |
| 327 | <?php |
| 328 | foreach ($order->attendees as $i => $attendee) |
| 329 | { |
| 330 | ?> |
| 331 | <table width="100%" style="border-spacing: 0; margin: 10px auto 0; padding: 0; font-size: 14px; background: #f2f3f7;"> |
| 332 | <tr> |
| 333 | <td style="padding: 0; line-height: 1.4em; text-align: left;"> |
| 334 | <div style="background: #eee; border-bottom: 1px solid #ddd; padding: 10px;"><?php echo JText::sprintf('VAP_N_ATTENDEE', $i + 2); ?></div> |
| 335 | <div style="padding: 10px; background-color: #f2f3f7;"> |
| 336 | <?php |
| 337 | foreach ($attendee['display'] as $label => $value) |
| 338 | { |
| 339 | ?> |
| 340 | <div style="padding: 2px 0;"> |
| 341 | <div style="display: inline-block; width: 180px;"><?php echo $label; ?></div> |
| 342 | <div style="display: inline-block;"><?php echo $value; ?></div> |
| 343 | </div> |
| 344 | <?php |
| 345 | } |
| 346 | ?> |
| 347 | </div> |
| 348 | </td> |
| 349 | </tr> |
| 350 | </table> |
| 351 | <?php |
| 352 | } |
| 353 | ?> |
| 354 | </td> |
| 355 | </tr> |
| 356 | <?php |
| 357 | } |
| 358 | ?> |
| 359 | |
| 360 | <!-- CUSTOM POSITION BOTTOM --> |
| 361 | |
| 362 | <tr> |
| 363 | <td style="padding: 0; text-align: center;"> |
| 364 | <table width="100%" style="border-spacing: 0; margin: 0 auto;"> |
| 365 | <tr> |
| 366 | <td> |
| 367 | {custom_position_bottom} |
| 368 | </td> |
| 369 | </tr> |
| 370 | </table> |
| 371 | </td> |
| 372 | </tr> |
| 373 | |
| 374 | <!-- ORDER LINK --> |
| 375 | |
| 376 | <tr class="no-printable"> |
| 377 | <td style="padding: 0; text-align: center;"> |
| 378 | <table width="100%" style="border-spacing: 0; margin: 10px auto 0; padding: 0; font-size: 14px; background: #f2f3f7;"> |
| 379 | <tr> |
| 380 | <td style="padding: 0; line-height: 1.4em; text-align: left;"> |
| 381 | <div style="background: #eee; border-bottom: 1px solid #ddd; padding: 10px;"><?php echo JText::translate('VAPORDERLINK'); ?></div> |
| 382 | <div style="padding: 10px;"> |
| 383 | <a href="{order_link}" target="_blank" style="word-break: break-word;">{order_link}</a> |
| 384 | </div> |
| 385 | </td> |
| 386 | </tr> |
| 387 | </table> |
| 388 | </td> |
| 389 | </tr> |
| 390 | |
| 391 | <!-- CONFIRMATION LINK --> |
| 392 | |
| 393 | <?php |
| 394 | if ($order->statusRole == 'PENDING') |
| 395 | { |
| 396 | ?> |
| 397 | <tr class="no-printable"> |
| 398 | <td style="padding: 0; text-align: center;"> |
| 399 | <table width="100%" style="border-spacing: 0; margin: 10px auto 0; padding: 0; font-size: 14px; background: #f2f3f7;"> |
| 400 | <tr> |
| 401 | <td style="padding: 0; line-height: 1.4em; text-align: left;"> |
| 402 | <div style="background: #eee; border-bottom: 1px solid #ddd; padding: 10px;"><?php echo JText::translate('VAPCONFIRMATIONLINK'); ?></div> |
| 403 | <div style="padding: 10px;"> |
| 404 | <a href="{confirmation_link}" target="_blank" style="word-break: break-word;">{confirmation_link}</a> |
| 405 | </div> |
| 406 | </td> |
| 407 | </tr> |
| 408 | </table> |
| 409 | </td> |
| 410 | </tr> |
| 411 | <?php |
| 412 | } |
| 413 | ?> |
| 414 | |
| 415 | <!-- CUSTOM POSITION FOOTER --> |
| 416 | |
| 417 | <tr> |
| 418 | <td style="padding: 0; text-align: center;"> |
| 419 | <table width="100%" style="border-spacing: 0; margin: 0 auto;"> |
| 420 | <tr> |
| 421 | <td style=""> |
| 422 | {custom_position_footer} |
| 423 | </td> |
| 424 | </tr> |
| 425 | </table> |
| 426 | </td> |
| 427 | </tr> |
| 428 | |
| 429 | </table> |
| 430 | |
| 431 | <!--[if (gte mso 9)|(IE)]> |
| 432 | </td> |
| 433 | </tr> |
| 434 | </table> |
| 435 | <![endif]--> |
| 436 | |
| 437 | </div> |
| 438 | </div> |
| 439 | |
| 440 | <?php |
| 441 | /** |
| 442 | * @var string|null {logo} The logo image of your company. Null if not specified. |
| 443 | * @var int {order_number} The unique ID of the reservation. |
| 444 | * @var string {order_key} The serial key of the reservation. |
| 445 | * @var string {order_status} The status of the order. |
| 446 | * @var string {order_payment} The name of the payment processor selected. Returns "None" if empty. |
| 447 | * @var float {order_total_cost} The total cost of the order. |
| 448 | * @var float {order_total_net} The total net of the order. |
| 449 | * @var float {order_total_tax} The total taxes of the order. |
| 450 | * @var float {order_total_discount} The total discount of the order. |
| 451 | * @var string {order_coupon_code} The coupon code used for the order. Returns "None" if empty. |
| 452 | * @var string {order_link} The direct url to the page of the order. |
| 453 | * @var string|null {confirmation_link} The direct url to confirm the order. Null when the status of the order is not PENDING. |
| 454 | * @var string|null {company_name} The name of the company. |
| 455 | * @var string|null {user_name} The name of the user account. |
| 456 | * @var string|null {user_username} The username of the user account. |
| 457 | * @var string|null {user_email} The e-mail address of the user account. |
| 458 | * @var string|null {custom_position_top} This tag will be replaced with all the Custom Text Contents assigned to the top position. |
| 459 | * @var string|null {custom_position_middle} This tag will be replaced with all the Custom Text Contents assigned to the middle position. |
| 460 | * @var string|null {custom_position_bottom} This tag will be replaced with all the Custom Text Contents assigned to the bottom position. |
| 461 | * @var string|null {custom_position_footer} This tag will be replaced with all the Custom Text Contents assigned to the footer position. |
| 462 | */ |
| 463 |