PluginProbe
VikBooking Hotel Booking Engine & PMS / 1.8.16
VikBooking Hotel Booking Engine & PMS v1.8.16
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
← All changes | admin/helpers/src/model/quote.php +15 -1 1.8.8 → 1.8.16 View file →
@@ -57,8 +57,11 @@
57 57
58 58 if (!empty($data['valid_until'])) {
59 59 // convert the provided date-time string into UTC
60 60 $data['valid_until'] = JFactory::getDate($data['valid_until'], JFactory::getApplication()->get('offset'))->toSql();
61 + } else {
62 + // force the value to be null
63 + $data['valid_until'] = null;
61 64 }
62 65
63 66 if (!empty($data['country_3_code']) && strlen($data['country_3_code']) !== 3) {
64 67 // attempt to convert a country iso2 code into the corresponding iso3 char code
@@ -136,8 +139,9 @@
136 139 $dbo->qn('o.sid'),
137 140 $dbo->qn('o.idpayment'),
138 141 $dbo->qn('o.roomsnum'),
139 142 $dbo->qn('o.total'),
143 + $dbo->qn('o.lang'),
140 144 $dbo->qn('o.idquote'),
141 145 $dbo->qn('or.idroom'),
142 146 $dbo->qn('or.adults'),
143 147 $dbo->qn('or.children'),
@@ -213,8 +217,9 @@
213 217 'checkout' => $bookingRoomsData[0]->checkout,
214 218 'nights' => $bookingRoomsData[0]->days,
215 219 'status' => $bookingRoomsData[0]->status,
216 220 'total' => $bookingRoomsData[0]->total,
221 + 'lang' => $bookingRoomsData[0]->lang,
217 222 'idpayment' => $bookingRoomsData[0]->idpayment,
218 223 'sid' => $bookingRoomsData[0]->sid,
219 224 'ts' => $bookingRoomsData[0]->ts,
220 225 'rooms' => $quoteSolutionRooms,
@@ -389,8 +394,17 @@
389 394
390 395 // access booking registry for the first related booking (if any)
391 396 $bookingRegistry = $bookingIds ? VBOBookingRegistry::getInstance(['id' => $bookingIds[0] ?? 0]) : null;
392 397
398 + // get booking language
399 + $lang = $bookingRegistry->getProperty('lang');
400 +
401 + // route quote URI
402 + $quoteUri = VikBooking::externalroute(
403 + "index.php?option=com_vikbooking&view=quote&ref={$quote->uuid}" . ($lang ? "&lang={$lang}" : ''),
404 + false
405 + );
406 +
393 407 // build the list of known tag parameters
394 408 $tagParameters = [
395 409 '{first_name}' => $quote->first_name ?? '',
396 410 '{last_name}' => $quote->last_name ?? '',
@@ -399,9 +413,9 @@
399 413 '{num_nights}' => $bookingRegistry ? $bookingRegistry->getTotalNights() : 0,
400 414 '{tot_adults}' => $bookingRegistry ? $bookingRegistry->countTotalAdults() : 0,
401 415 '{tot_children}' => $bookingRegistry ? $bookingRegistry->countTotalChildren() : 0,
402 416 '{tot_guests}' => $bookingRegistry ? $bookingRegistry->countTotalGuests() : 0,
403 - '{quote_link}' => VikBooking::externalroute("index.php?option=com_vikbooking&view=quote&ref={$quote->uuid}", false),
417 + '{quote_link}' => $quoteUri,
404 418 ];
405 419
406 420 /**
407 421 * Trigger event to allow third party plugins to manipulate the tag parameters.