PluginProbe
VikBooking Hotel Booking Engine & PMS / 1.7.1
VikBooking Hotel Booking Engine & PMS v1.7.1
1.8.16 1.8.15 1.8.14 1.8.13 1.8.12 1.8.11 1.8.10 1.8.9 1.8.6 1.8.7 1.8.8 trunk 1.6.0 1.6.1 1.6.2 1.6.3 1.6.4 1.6.5 1.6.6 1.6.7 1.6.8 1.6.9 1.7.0 1.7.1 1.7.2 All 37 releases
vikbooking / site / helpers / email_tmpl.php

email_tmpl.php in VikBooking Hotel Booking Engine & PMS 1.7.1, at site/helpers/email_tmpl.php

253 lines 10.6 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * @package VikBooking
4 * @subpackage com_vikbooking
5 * @author Alessio Gaggii - E4J srl
6 * @copyright Copyright (C) 2022 E4J srl. All rights reserved.
7 * @license GNU General Public License version 2 or later; see LICENSE
8 * @link https://vikwp.com
9 */
10
11 defined('_JEXEC') or defined('ABSPATH') or die('No script kiddies please!');
12
13 defined('_VIKBOOKINGEXEC') OR die('Restricted Area');
14
15 /**
16 * List of the available special tags that could be used in this template file:
17 * {company_name} - Can be set from the Configuration page.
18 * {logo} - Can be uploaded from the Configuration page.
19 * {order_id} - The ID of this booking
20 * {confirmnumb} - Confirmation Number
21 * {order_status} - Status of the booking
22 * {order_date} - Date of booking
23 * {customer_info} - String containing the customer information
24 * {rooms_count} - Number of rooms booked
25 * {rooms_info} - String formatted containing the information about the rooms booked
26 * {roomfeature VBODEFAULTDISTFEATUREONE} - Rooms Distinctive Features (see comments below)
27 * {checkin_date} - Date of arrival
28 * {checkout_date} - Date of departure
29 * {order_details} - String formatted with the booking details
30 * {order_total} - Booking total amount
31 * {order_deposit} - Deposit string formatted
32 * {order_total_paid} - Amount paid formatted
33 * {order_link} - HTML link to the booking details page in the front-end
34 * {booking_url} - Raw URL string to the booking details page in the front-end
35 * {footer_emailtext} - Can be set from the Configuration page
36 * {customfield 2} - Will be replaced with the Custom Field of ID 2 (Last Name by default - you can use any ID)
37 *
38 * The record of the booking can be accessed from the following global array in case you need any extra special tag or to perform queries for a deeper customization level:
39 * $booking_info (booking array)
40 * Example: the ID of the booking is contained in $booking_info['id'] - you can see the whole array content with the code "print_r($booking_info)"
41 *
42 * It is also possible to add some extra admin recipient address for the email message. This is useful in case you want to send the message to a particular
43 * email address, maybe when certain combinations are met, for example, when a specific room ID is booked. You can add one or more addresses by calling the
44 * method shown below with some examples of possible usage:
45 *
46 * VikBooking::addAdminEmailRecipient('[email protected]'); // this will add one recipient
47 * VikBooking::addAdminEmailRecipient(array('[email protected]', '[email protected]')); // this will add two extra recipients
48 *
49 * In this example with the two calls of the method, three more recipients in total will receive the email message.
50 */
51
52 ?>
53
54 <center class="text-direction-{lang_direction}" style="background: #fdfdfd; padding: 40px 0; color: #666; width: 100%; table-layout: fixed; direction: {lang_direction};">
55 <div style="text-align: center;">
56 <p>{logo}</p>
57 </div>
58 <div style="max-width: 800px; margin: 0 auto; background: #fff; box-shadow: 0 0 5px rgba(0, 0, 0, .2); padding: 30px; box-sizing: border-box; border-radius: 6px; border: 1px solid #ddd;">
59 <h1 style="margin-bottom: 20px; font-size: 32px; font-weight: 500; color: #45c29d; margin:0 0 10px; padding:0;">{company_name}</h1>
60 <!--[if (gte mso 9)|(IE)]>
61 <table width="800" align="center">
62 <tr>
63 <td>
64 <![endif]-->
65 <table style="margin: 0 auto; width: 100%; max-width: 800px; border-spacing: 0; font-family: sans-serif;">
66 <tbody>
67 <tr>
68 <td style="padding:0;">
69 <!--[if (gte mso 9)|(IE)]>
70 <table width="100%">
71 <tr>
72 <td width="50%" valign="top">
73 <![endif]-->
74 <div style="width: 100%; max-width: 355px; display: inline-block; vertical-align: top; text-align: {text_natural_direction};">
75 <table width="90%" style="margin: 10px auto 0; padding: 5px; font-size: 14px; background:#f2f3f7;">
76 <tr>
77 <td style="padding: 10px; line-height: 1.4em;">
78 <div style="min-height: 270px;">
79 <h3 style="background:#78B8C4; display:inline-block; padding:5px 10px; text-transform:uppercase; font-size:16px; color:#fff;"><?php echo JText::translate('VBMAILYOURBOOKING'); ?></h3>
80 <div>
81 <p><span><?php echo JText::translate('VBORDERNUMBER'); ?>:</span> <span>{order_id}</span></p>
82 </div>
83 {confirmnumb_delimiter}
84 <div>
85 <p><span><?php echo JText::translate('VBCONFIRMNUMB'); ?>:</span> <span>{confirmnumb}</span></p>
86 </div>
87 {/confirmnumb_delimiter}
88 <div>
89 <p><span><?php echo JText::translate('VBLIBSEVEN'); ?>:</span> <span class="{order_status_class}">{order_status}</span></p>
90 </div>
91 <div>
92 <p><span><?php echo JText::translate('VBLIBEIGHT'); ?>:</span> <span>{order_date}</span></p>
93 </div>
94 </div>
95 </td>
96 </tr>
97 </table>
98 </div>
99 <!--[if (gte mso 9)|(IE)]>
100 </td><td width="50%" valign="top">
101 <![endif]-->
102 <div style="width: 100%; max-width: 355px; display: inline-block; vertical-align: top; text-align: {text_natural_direction};">
103 <table width="90%" style="margin: 10px auto 0; padding: 5px; font-size: 14px; background:#f2f3f7;">
104 <tr>
105 <td style="padding: 10px; line-height: 1.4em;">
106 <div style="min-height: 270px;">
107 <h3 style="background:#78B8C4; display:inline-block; padding:5px 10px; text-transform:uppercase; font-size:16px; color:#fff;"><?php echo JText::translate('VBLIBNINE'); ?></h3>
108 <p>{customer_info}</p>
109 </div>
110 </td>
111 </tr>
112 </table>
113 </div>
114 <!--[if (gte mso 9)|(IE)]>
115 </td>
116 </tr>
117 </table>
118 <![endif]-->
119 </td>
120 </tr>
121 <tr>
122 <td style="padding:0;">
123 <!--[if (gte mso 9)|(IE)]>
124 <table width="100%">
125 <tr>
126 <td width="50%" valign="top">
127 <![endif]-->
128 <div style="width: 100%; max-width: 355px; display: inline-block; vertical-align: top; text-align: {text_natural_direction};">
129 <table width="90%" style="background:#f2f3f7; margin: 10px auto 0; padding: 5px; font-size: 14px;">
130 <tr>
131 <td style="padding: 10px; line-height: 1.4em;">
132 <div>
133 <div><strong><?php echo JText::translate('VBLIBTEN'); ?></strong><span> {rooms_count}</span></div>
134 <div>
135 {rooms_info}
136 <?php
137 //BEGIN: Rooms Distinctive Features - Default code
138 //Each unit of your rooms can have some distinctive features.
139 //Here you can list some of them for the customer email.
140 //The distintive features are composed of Key-Value pairs where Key is the name of the feature (i.e. Key: Room Number - Value: 102)
141 //By default the system generates 1 empty Key (Feature): Room Number.
142 //in this example we will only be listing this Key and others could be used for management purposes only.
143 //each Key (feature) can be expressed as a language definition contained in your .INI Translation Files. You could also express a Key literally as "Room Number" without translating it.
144 //By using the special-syntax {roomfeature KEY_NAME} the system will replace the Key with the corresponding value that you would like to display.
145 //By default the Key "Room Number" corresponds to the language definition VBODEFAULTDISTFEATUREONE.
146 //Let's display the Room Number (if it is not empty for the rooms booked):
147 ?>
148 {roomfeature VBODEFAULTDISTFEATUREONE}
149 <?php
150 //END: Rooms Distinctive Features - Default code
151 ?>
152 </div>
153 </div>
154 </td>
155 </tr>
156 </table>
157 </div>
158 <!--[if (gte mso 9)|(IE)]>
159 </td><td width="50%" valign="top">
160 <![endif]-->
161 <div style="width: 100%; max-width: 355px; display: inline-block; vertical-align: top; text-align: {text_natural_direction};">
162 <table width="90%" style="margin: 10px auto 0; padding: 5px; font-size: 14px; background:#f2f3f7;">
163 <tr>
164 <td style="padding: 10px; line-height: 1.4em;">
165 <div>
166 <p>
167 <span style="font-weight:600;"><?php echo JText::translate('VBLIBELEVEN'); ?>:</span>
168 <span>{checkin_date}</span>
169 </p>
170 </div>
171 <div>
172 <p>
173 <span style="font-weight:600;"><?php echo JText::translate('VBLIBTWELVE'); ?>:</span>
174 <span>{checkout_date}</span>
175 </p>
176 </div>
177 </td>
178 </tr>
179 </table>
180 </div>
181 <!--[if (gte mso 9)|(IE)]>
182 </td>
183 </tr>
184 </table>
185 <![endif]-->
186 </td>
187 </tr>
188 <tr>
189 <td style="padding: 0; text-align: center;">
190 <table width="95%" style="border-spacing: 0; margin: 10px auto 0; padding: 15px; font-size: 14px; background: #fff;">
191 <tr>
192 <td style="padding: 10px; line-height: 1.4em; text-align: {text_natural_direction};">
193 <div>
194 <h3 style="background:#78B8C4; display:inline-block; padding:5px 10px; text-transform:uppercase; font-size:16px; color:#fff;"><?php echo JText::translate('VBORDERDETAILS'); ?></h3>
195 <div style="padding:10px; margin:2px 0;">
196 <div>
197 {order_details}
198 </div>
199 <div style="padding:10px; background:#f2f3f7; border:1px solid #45C29D; margin:10px 0;">
200 <span><?php echo JText::translate('VBLIBSIX'); ?></span>
201 <span style="float: {text_opposite_direction};">
202 <strong>{order_total}</strong>
203 </span>
204 </div>
205 <div>{order_deposit}</div>
206 <div>{order_total_paid}</div>
207 </div>
208 </div>
209 </td>
210 </tr>
211 </table>
212 </td>
213 </tr>
214 <tr>
215 <td style="padding: 0; text-align: center;">
216 <table width="95%" style="border-spacing: 0; margin: 0 auto; font-size: 14px; background: #fff;">
217 <tr>
218 <td style="line-height: 1.4em; text-align: {text_natural_direction};">
219 <div>
220 <strong><?php echo JText::translate('VBLIBTENTHREE'); ?></strong><br/>
221 {order_link}
222 </div>
223 <div>
224 <div>{footer_emailtext}</div>
225 </div>
226 <div>
227 <br/>
228 </div>
229 </td>
230 </tr>
231 </table>
232 </td>
233 </tr>
234 </tbody>
235 </table>
236 <!--[if (gte mso 9)|(IE)]>
237 </td>
238 </tr>
239 </table>
240 <![endif]-->
241 </div>
242 </center>
243
244 <style type="text/css">
245 <!--
246 .confirmed {color: #009900;}
247 .standby {color: #cc9a04;}
248 .cancelled {color: #ff0000;}
249 .text-direction-ltr .service-amount {float: right;}
250 .text-direction-rtl .service-amount {display: inline-block; margin-right: 5px;}
251 -->
252 </style>
253