get('vcmChannelData', ''); if (!empty($vcmchanneldata) && is_array($vcmchanneldata) && count($vcmchanneldata) > 0) { if (array_key_exists('disclaimer', $vcmchanneldata) && !empty($vcmchanneldata['disclaimer'])) { $channel_disclaimer = true; } } $rooms = $this->rooms; $roomsnum = $this->roomsnum; $tars = $this->tars; $prices = $this->prices; $arrpeople = $this->arrpeople; $selopt = $this->selopt; $days = $this->days; $coupon = $this->coupon; $first = $this->first; $second = $this->second; $payments = $this->payments; $cfields = $this->cfields; $customer_details = $this->customer_details; $countries = $this->countries; $pkg = $this->pkg; $vbo_tn = $this->vbo_tn; /** * Custom listing check-in and check-out times. * * @since 1.18.3 (J) - 1.8.3 (WP) */ $listing_custom_checkin = ''; $listing_custom_checkout = ''; if ($roomsnum == 1) { $listing_custom_checkin = VikBooking::getRoomParam('checkin', ($rooms[(key($rooms))]['params'] ?? '')); $listing_custom_checkout = VikBooking::getRoomParam('checkout', ($rooms[(key($rooms))]['params'] ?? '')); } // JS lang def JText::script('VBO_RM_COUPON_CONFIRM'); $vbo_app = VikBooking::getVboApplication(); $showchildren = VikBooking::showChildrenFront(); $totadults = 0; $totchildren = 0; $is_package = is_array($pkg) && count($pkg) > 0 ? true : false; $pitemid = VikRequest::getInt('Itemid', '', 'request'); // single category filter $pcategories = VikRequest::getString('categories', '', 'request'); // multiple category filters $pcategory_ids = VikRequest::getVar('category_ids', array()); $wdays_map = array( JText::translate('VBWEEKDAYZERO'), JText::translate('VBWEEKDAYONE'), JText::translate('VBWEEKDAYTWO'), JText::translate('VBWEEKDAYTHREE'), JText::translate('VBWEEKDAYFOUR'), JText::translate('VBWEEKDAYFIVE'), JText::translate('VBWEEKDAYSIX') ); if (VikBooking::tokenForm()) { $vikt = uniqid(rand(17, 1717), true); $session->set('vikbtoken', $vikt); $tok = "\n"; } else { $tok = ""; } $document = JFactory::getDocument(); if (VikBooking::loadJquery()) { JHtml::fetch('jquery.framework', true, true); } $document->addStyleSheet(VBO_SITE_URI.'resources/jquery-ui.min.css'); $document->addStyleSheet(VBO_SITE_URI.'resources/jquery.fancybox.css'); JHtml::fetch('script', VBO_SITE_URI.'resources/jquery-ui.min.js'); JHtml::fetch('script', VBO_SITE_URI.'resources/jquery.fancybox.js'); foreach ($cfields as $cf) { if (!empty($cf['poplink'])) { ?> roomindex as $rindex) { $roomindexlink .= '&roomindex[]=' . $rindex; } if (count($this->mod_booking)) { //booking modification ?>
  1. roomsnum < 2 && (int) $session->get('vboSearchRoomId', 0) == (int) $this->rooms[1]['id']) { // we started the search from the room details page, so the dates link should point there $dateslink = JRoute::rewrite('index.php?option=com_vikbooking&view=roomdetails&roomid='.$this->rooms[1]['id'].'&checkin='.$first.'&checkout='.$second.(!empty($pitemid) ? '&Itemid='.$pitemid : '')); } else { // link to general search form $dateslink = JRoute::rewrite('index.php?option=com_vikbooking&view=vikbooking&checkin='.$first.'&checkout='.$second.(!empty($pitemid) ? '&Itemid='.$pitemid : '')); } ?>
split_stay) ? 'random' : 'calendar'), 'vbo-pref-color-text'); ?>
0) { ?>
$r) { $ind = $num - 1; // determine values to be considered $room_nights = $this->days; $room_checkin = $this->first; $room_checkout = $this->second; $is_split_room = false; if (!empty($this->split_stay) && isset($this->split_stay[$ind]) && $this->split_stay[$ind]['idroom'] == $r['id']) { $room_nights = $this->split_stay[$ind]['nights']; $room_checkin = $this->split_stay[$ind]['checkin_ts']; $room_checkout = $this->split_stay[$ind]['checkout_ts']; $is_split_room = true; } if ($is_package === true) { $pkg_cost = $pkg['pernight_total'] == 1 ? ($pkg['cost'] * $days) : $pkg['cost']; $pkg_cost = $pkg['perperson'] == 1 ? ($pkg_cost * ($arrpeople[$num]['adults'] > 0 ? $arrpeople[$num]['adults'] : 1)) : $pkg_cost; $tmpimp = VikBooking::sayPackageMinusIva($pkg_cost, $pkg['idiva']); $tmptotdue = VikBooking::sayPackagePlusIva($pkg_cost, $pkg['idiva']); $base_cost = $pkg_cost; } else { $tmpimp = VikBooking::sayCostMinusIva($tars[$num][0]['cost'], $tars[$num][0]['idprice']); $tmptotdue = VikBooking::sayCostPlusIva($tars[$num][0]['cost'], $tars[$num][0]['idprice']); $base_cost = $tars[$num][0]['cost']; } $imp += $tmpimp; $totdue += $tmptotdue; if ($tmptotdue == $base_cost) { $tot_taxes += ($base_cost - $tmpimp); } else { $tot_taxes += ($tmptotdue - $base_cost); } $saywithout = $tmpimp; $saywith = $tmptotdue; if (isset($selopt[$num]) && is_array($selopt[$num])) { foreach ($selopt[$num] as $selo) { $wop .= $num . "_" . $selo['id'] . ":" . $selo['quan'] . (array_key_exists('chageintv', $selo) ? '-'.$selo['chageintv'] : '') . ";"; $realcost = (intval($selo['perday']) == 1 ? ($selo['cost'] * $room_nights * $selo['quan']) : ($selo['cost'] * $selo['quan'])); if (!empty ($selo['maxprice']) && $selo['maxprice'] > 0 && $realcost > $selo['maxprice']) { $realcost = $selo['maxprice']; if (intval($selo['hmany']) == 1 && intval($selo['quan']) > 1) { $realcost = $selo['maxprice'] * $selo['quan']; } } if ($selo['perperson'] == 1) { $realcost = $realcost * $arrpeople[$num]['adults']; } /** * Trigger event to allow third party plugins to apply a custom calculation for the option/extra fee or tax. * * @since 1.17.7 (J) - 1.7.7 (WP) */ $custom_calc_booking = ['days' => $room_nights]; $custom_calc_booking_room = array_merge(($arrpeople[$num] ?? []), ['room_cost' => $base_cost]); $custom_calculation = VBOFactory::getPlatform()->getDispatcher()->filter('onCalculateBookingOptionFeeCost', [$realcost, &$selo, $custom_calc_booking, $custom_calc_booking_room]); if ($custom_calculation) { $realcost = (float) $custom_calculation[0]; } $optbeforetax = VikBooking::sayOptionalsMinusIva($realcost, $selo['idiva']); $imp += $optbeforetax; $tmpopr = VikBooking::sayOptionalsPlusIva($realcost, $selo['idiva']); $totdue += $tmpopr; if ($selo['is_citytax'] == 1) { $tot_city_taxes += $optbeforetax; } elseif ($selo['is_fee'] == 1) { $tot_fees += $optbeforetax; } // VBO 1.11 - always calculate the amount of tax no matter if this is already a tax or a fee if ($tmpopr == $realcost) { $tot_taxes += ($realcost - $optbeforetax); } else { $tot_taxes += ($tmpopr - $realcost); } // } } ?>
roomindex) && !empty($this->roomindex[($num - 1)])) { $room_feature = VikBooking::getRoomUnitDistinctiveFeature($r['params'], $this->roomindex[($num - 1)]); if ($room_feature !== false) { ?>
".VikBooking::getPriceAttr($tars[$num][0]['idprice'], $vbo_tn).": ".$tars[$num][0]['attrdata'] : ""); } ?>
0 ? ", ".$arrpeople[$num]['children']." ".($arrpeople[$num]['children'] == 1 ? JText::translate('VBSEARCHRESCHILD') : JText::translate('VBSEARCHRESCHILDREN')) : ""); ?>
%s', '%s']); ?>
%s', '%s']); ?>
%s', '%s']); ?>
0 && $thisoptcost > $aop['maxprice']) { $thisoptcost = $aop['maxprice']; if (intval($aop['hmany']) == 1 && intval($aop['quan']) > 1) { $thisoptcost = $aop['maxprice'] * $aop['quan']; } } if ($aop['perperson'] == 1) { $thisoptcost = $thisoptcost * $arrpeople[$num]['adults']; } /** * Trigger event to allow third party plugins to apply a custom calculation for the option/extra fee or tax. * * @since 1.17.7 (J) - 1.7.7 (WP) */ $custom_calc_booking = ['days' => $room_nights]; $custom_calc_booking_room = array_merge(($arrpeople[$num] ?? []), ['room_cost' => ($base_cost ?? 0)]); $custom_calculation = VBOFactory::getPlatform()->getDispatcher()->filter('onCalculateBookingOptionFeeCost', [$thisoptcost, &$aop, $custom_calc_booking, $custom_calc_booking_room]); if ($custom_calculation) { $thisoptcost = (float) $custom_calculation[0]; } $optwithout = VikBooking::sayOptionalsMinusIva($thisoptcost, $aop['idiva']); $optwith = VikBooking::sayOptionalsPlusIva($thisoptcost, $aop['idiva']); $opttax = ($optwith - $optwithout); ?>
1 ? " (x ".$aop['quan'].")" : ""); ?>
%s', '%s']); ?>
%s', '%s']); ?>
%s', '%s']); ?>
1 && $num < $roomsnum) { // we no longer need a separator between the rooms containers } } // store Order Total in session for modules $session->set('vikbooking_ordertotal', $totdue); // coupon code $origtotdue = $totdue; $usedcoupon = false; if (!empty($coupon)) { // check min tot ord $coupontotok = true; if (strlen((string)$coupon['mintotord'])) { if ($totdue < $coupon['mintotord']) { $coupontotok = false; } } if ($coupon['maxtotord'] > 0 && $totdue > $coupon['maxtotord']) { $coupontotok = false; } if ($coupontotok) { $usedcoupon = true; if ($coupon['percentot'] == 1) { // percent value $minuscoupon = 100 - $coupon['value']; /** * We allow coupon codes to be applied on the entire reservation or as always just on the total minus mandatory taxes. * * @since 1.13.5 (J) - 1.3.5 (WP) * @since 1.14.3 (J) - 1.4.3 (WP) we also exclude the amount of taxes beside the mandatory fees. * @since 1.16.0 (J) - 1.6.0 (WP) taxes are proportionally calculated when coupon before tax. * @since 1.16.8 (J) - 1.6.8 (WP) with coupon before taxes, discounted amount calculation is an equal subtration. */ $prev_totdue = $totdue; $tot_net = ($totdue - $tot_taxes - $tot_city_taxes - $tot_fees); $couponsave = ($coupon['excludetaxes'] ? $tot_net : $totdue) * $coupon['value'] / 100; $totdue = ($coupon['excludetaxes'] ? $tot_net : $totdue) * $minuscoupon / 100; $tot_taxes = $coupon['excludetaxes'] ? ($tot_taxes * ($tot_net - $couponsave) / $tot_net) : ($tot_taxes * $minuscoupon / 100); $totdue += $coupon['excludetaxes'] ? ($tot_taxes + $tot_city_taxes + $tot_fees) : 0; $couponsave = abs($prev_totdue - $totdue); } else { // total value $couponsave = $coupon['value']; $tax_prop = $tot_taxes * $coupon['value'] / $totdue; $tot_taxes -= $tax_prop; $tot_taxes = $tot_taxes < 0 ? 0 : $tot_taxes; $totdue -= $coupon['value']; $totdue = $totdue < 0 ? 0 : $totdue; } } else { if ($coupon['maxtotord'] > 0 && $totdue > $coupon['maxtotord']) { VikError::raiseWarning('', JText::translate('VBCOUPONINVMAXTOTORD')); } else { VikError::raiseWarning('', JText::translate('VBCOUPONINVMINTOTORD')); } } if (!$usedcoupon) { // reset the coupon value to allow again to submit a new coupon code $coupon = []; } } // inject extra information for tracker VikBooking::getTracker() ->setExtraInfo('total', $totdue); ?>
%s', '%s']); ?>
%s', '%s']); ?>
%s', '%s']); ?>
'com_vikbooking', 'task' => 'oconfirm', 'Itemid' => (!empty($pitemid) ? $pitemid : null), ]; $coupon_rq_vals = JFactory::getApplication()->input->getArray(); foreach ($coupon_rq_vals as $rq_key => $rq_val) { if ($rq_key == 'couponcode' || $rq_key == 'applyacoupon') { continue; } if (!isset($coupon_res_vals[$rq_key])) { $coupon_res_vals[$rq_key] = $rq_val; } } $coupon_rm_link = JRoute::rewrite('index.php?' . http_build_query($coupon_res_vals), true); ?>
- %s', '%s']); ?>
%s', '%s']); ?>
mod_booking) && $this->mod_booking['total'] > 0) { //booking modification $modbook_tot_diff = abs($this->mod_booking['total'] - $totdue); $modbook_diff_op = $this->mod_booking['total'] <= $totdue ? '+' : '-'; ?>
mod_booking['total']), $currencysymb, ['%s', '%s']); ?>
%s', '%s']); ?>
mod_booking) { ?>
$r) { echo ''."\n"; echo ''."\n"; echo ''."\n"; echo ''."\n"; if (isset($selopt[$num]) && is_array($selopt[$num])) { foreach ($selopt[$num] as $aop) { echo ''."\n"; } } } ?>
0)) { ?>

email) ? $currentUser->email : ""; $useremail = array_key_exists('email', $customer_details) ? $customer_details['email'] : $useremail; $nominatives = array(); if (count($customer_details) > 0) { $nominatives[] = $customer_details['first_name']; $nominatives[] = $customer_details['last_name']; } foreach ($cfields as $cf) { if (intval($cf['required']) == 1) { $isreq = "* "; } else { $isreq = ""; } if (!empty ($cf['poplink'])) { $fname = "" . JText::translate($cf['name']) . ""; } else { $fname = ""; } if ($cf['type'] == "text") { $def_textval = ''; if ($cf['isemail'] == 1) { $def_textval = $useremail; } elseif ($cf['isphone'] == 1) { if (array_key_exists('phone', $customer_details)) { $def_textval = $customer_details['phone']; } } elseif ($cf['isnominative'] == 1) { if (count($nominatives) > 0) { $def_textval = array_shift($nominatives); } } elseif (array_key_exists('cfields', $customer_details)) { if (array_key_exists($cf['id'], $customer_details['cfields'])) { $def_textval = $customer_details['cfields'][$cf['id']]; } } ?>
printPhoneInputField(array('name' => 'vbf' . $cf['id'], 'id' => 'vbf-inp' . $cf['id'], 'value' => $def_textval, 'class' => 'vbinput vbf-phoneinp', 'size' => '40')); } else { $input_type = $cf['isemail'] == 1 ? 'email' : 'text'; ?>
getCalendar('', 'vbf'.$cf['id'], 'vbf-inp'.$cf['id'], VikBooking::getDateFormat(), array('class'=>'vbinput', 'size'=>'10', 'maxlength'=>'19')); ?>
'."\n"; foreach ($countries as $country) { $countries_sel .= '' . "\n"; } $countries_sel .= ''; ?>
\n"; foreach ($answ as $aw) { if (!empty ($aw)) { $wcfsel .= "\n"; } } $wcfsel .= "\n"; ?>
30 ? "vbseparatorcflong" : "vbseparatorcf"; ?>

/>
'."\n"; } foreach ($rooms as $num => $r) { if ($is_package !== true) { echo ''."\n"; } echo ''."\n"; echo ''."\n"; echo ''."\n"; echo ''."\n"; } if (!empty($this->split_stay)) { // add hidden fields for the split stay booking foreach ($this->split_stay as $spsk => $sps_room) { foreach ($sps_room as $sps_room_k => $sps_room_v) { if ($sps_room_k == 'checkin_ts' || $sps_room_k == 'checkout_ts') { // these values are better to be re-calculated continue; } ?> mod_booking)) { ?>

0, Deposit Non-Refundable=true, Deposit < 100 if %) //deposit is always disabled for booking modification $dep_amount = VikBooking::getAccPerCent(); $dep_amount = VikBooking::calcDepositOverride($dep_amount, $days); $dep_type = VikBooking::getTypeDeposit(); $dep_nonrefund_allowed = VikBooking::allowDepositFromRates($tars); if (!(count($this->mod_booking) > 0) && !VikBooking::payTotal() && VikBooking::depositAllowedDaysAdv($second) && VikBooking::depositCustomerChoice() && $dep_amount > 0 && $dep_nonrefund_allowed && ($dep_type == "fixed" || ($dep_type != "fixed" && $dep_amount < 100))) { $dep_amount = ($dep_amount - abs($dep_amount)) > 0.00 ? VikBooking::numberFormat($dep_amount) : $dep_amount; $dep_string = $dep_type == "fixed" ? VikBooking::formatCurrencyNumber($dep_amount, $currencysymb) : $dep_amount . '%'; ?>

get('depbalancedays'); if (is_numeric($pay_balance_days_adv)) { ?>
roomindex as $rindex) { ?>