function accommodationdetails_saledetails($resource_name) { $parts = explode('-', $resource_name); $resource_id = $parts[0]; $model = new BookingForConnectorModelOnSellUnit(); $resource = $model->getItem($resource_id); $merchant = $resource->Merchant; $language = $GLOBALS['bfi_lang']; $privacy = BFCHelper::GetPrivacy($language); $images = array(); if ($resource->ImageUrl != null && $resource->ImageUrl != '') { $images[] = $resource->ImageUrl; } foreach (explode(',', $resource->ImageData) as $image) { if (!empty($images[0]) && basename($image) != basename($images[0]) && $images[0]) { $images[] = $image; } } if (!isset($_REQUEST['layout'])) { ob_start(); include 'templates/onsell-gallery.php'; $gallery = ob_get_contents(); ob_end_clean(); $order_type = 'b.short'; ob_start(); include 'templates/sellonrequestform.php'; $sellonrequestform = ob_get_contents(); ob_end_clean(); ob_start(); include 'templates/sellonsearchform.php'; $sellonsearchform = ob_get_contents(); ob_end_clean(); include 'templates/onsellunit.php'; } else { if ($_REQUEST['layout'] == 'rapidview') { //echo '<PRE>';print_r($resource); $merchant = $resource->Merchant; //echo '<PRE>';print_r($merchant);die(); $resourceLat = $resource->XPos; $resourceLon = $resource->YPos; $isMapVisible = $resource->IsMapVisible; $isMapMarkerVisible = $resource->IsMapMarkerVisible; $showResourceMap = $resourceLat != null && $resourceLon != null && $isMapVisible; $htmlmarkerpoint = ""; if ($isMapMarkerVisible) { $htmlmarkerpoint = "&markers=color:blue%7C" . $resourceLat . "," . $resourceLon; } $images = array(); if ($resource->ImageUrl != null && $resource->ImageUrl != '') { $images[] = $resource->ImageUrl; } foreach (explode(',', $resource->ImageData) as $image) { if (!empty($images[0]) && basename($image) != basename($images[0]) && $images[0]) { $images[] = $image; } } ob_start(); include 'templates/resourceonsale-rapidview.php'; $resource_html = ob_get_contents(); ob_end_clean(); wp_send_json(array('mainhtml' => $resource_html, 'htmlmarkerpoint' => $htmlmarkerpoint, 'resourceLon' => $resourceLon, 'title' => $resource->Name)); } } }
$uriMerchantthanks = $uriMerchant . '&layout=thanks'; $uriMerchant .= '&layout=contacts'; $route = JRoute::_($uriMerchant); $routeThanks = JRoute::_($uriMerchantthanks); $cNationList = BFCHelper::parseArrayList(JTEXT::_('COM_BOOKINGFORCONNECTOR_VIEW_CONSTANTS_NATIONSLIST')); //$cLanguageList = BFCHelper::parseArrayList(JTEXT::_('COM_BOOKINGFORCONNECTOR_VIEW_CONSTANTS_LANGUAGESLIST')); $cultureCode = strtolower(substr($this->language, 0, 2)); $nationCode = strlen($this->language) == 5 ? strtolower(substr($this->language, 3, 2)) : $cultureCode; $keys = array_keys($cNationList); $nations = array_values(array_filter($keys, function ($item) use($nationCode) { return strtolower($item) == $nationCode; })); $nation = !empty(count($nations)) ? strtoupper($nations[0]) : strtoupper($cultureCode); $culture = ""; $formRoute = "index.php?option=com_bookingforconnector&task=sendOffer"; $privacy = BFCHelper::GetPrivacy($this->language); ?> <div class="com_bookingforconnector_merchantdetails com_bookingforconnector_merchantdetails-t<?php echo $this->item->MerchantTypeId; ?> "> <?php if ($this->items != null) { $offer = $this->items; ?> <h2 class="com_bookingforconnector_resource-name"><?php echo $offer->Name; ?> </h2> <div class="clear"></div>
<?php $base_url = get_site_url(); $language = $GLOBALS['bfi_lang']; if (defined('ICL_LANGUAGE_CODE') && class_exists('SitePress')) { $language = ICL_LANGUAGE_CODE; global $sitepress; if ($sitepress->get_current_language() != $sitepress->get_default_language()) { $base_url .= "/" . ICL_LANGUAGE_CODE; } } $formlabel = get_option('form_key', ''); $formRoute = $base_url . '/sendOffer'; $routeThanks = $base_url . '/thanks/merchant-details/merchantdetails/' . $merchant->MerchantId . '-' . seoUrl($merchant->Name); $privacy = BFCHelper::GetPrivacy($language); ?> <div class="com_bookingforconnector_merchantdetails com_bookingforconnector_merchantdetails-t<?php echo $merchant->MerchantTypeId; ?> "> <?php //include('merchant-head.php'); ?> <?php if ($offer != null) { ?> <div class="com_bookingforconnector_merchantdetails-offers"> <?php $offer->OfferId = $offer->PackageId; $offer->Price = $offer->Value; $offerName = BFCHelper::getLanguage($offer->Name, $language);