Exemplo n.º 1
0
 public function getCheckAvailabilityCalendarFromService($resourcesId = null, $checkIn = null, $checkOut = null)
 {
     $resultCheck = '';
     if ($resourcesId == null || $checkIn == null || $checkOut == null) {
         return $resultCheck;
     }
     if ($checkIn == null) {
         $defaultDate = DateTime::createFromFormat('d/m/Y', BFCHelper::getStartDate());
         $checkIn = BFCHelper::getStayParam('checkin', $defaultDate);
     }
     if ($checkOut == null) {
         $checkOut = BFCHelper::getStayParam('checkout', $checkIn->modify(BFCHelper::$defaultDaysSpan));
     }
     //calcolo le settimane necessarie
     //$ci = $params['checkin'];
     $options = array('path' => $this->urlCheckAvailabilityCalendar, 'data' => array('resourcesId' => BFCHelper::getQuotedString($resourcesId), 'checkin' => '\'' . $checkIn->format('Ymd') . '\'', 'checkout' => '\'' . $checkOut->format('Ymd') . '\'', '$format' => 'json'));
     $url = $this->helper->getQuery($options);
     $r = $this->helper->executeQuery($url);
     if (isset($r)) {
         $res = json_decode($r);
         $checkDate = $res->d->results ?: $res->d;
         $resultCheck = $checkDate->CheckAvailabilityCalendarByIdList;
     }
     return $resultCheck;
 }
 protected function populateState($ordering = NULL, $direction = NULL)
 {
     $session = JFactory::getSession();
     $searchseed = $session->get('searchseed', rand(), 'com_bookingforconnector');
     if (!$session->has('searchseed', 'com_bookingforconnector')) {
         $session->set('searchseed', $searchseed, 'com_bookingforconnector');
     }
     if (!isset($defaultDate)) {
         $defaultDate = DateTime::createFromFormat('d/m/Y', BFCHelper::getStartDate());
     }
     $ci = clone BFCHelper::getStayParam('checkin', $defaultDate);
     $this->setState('params', array('merchantId' => JRequest::getInt('merchantId'), 'offerId' => JRequest::getInt('offerId'), 'packageid' => JRequest::getInt('packageId'), 'onSellUnitId' => JRequest::getInt('onsellunitid'), 'searchseed' => $searchseed, 'filters' => JRequest::getVar('filters'), 'checkin' => BFCHelper::getStayParam('checkin', $defaultDate), 'checkout' => BFCHelper::getStayParam('checkout', $ci->modify(BFCHelper::$defaultDaysSpan)), 'duration' => BFCHelper::getStayParam('duration'), 'paxages' => BFCHelper::getStayParam('paxages'), 'paxes' => count(BFCHelper::getStayParam('paxes'))));
     return parent::populateState($ordering, $direction);
 }
Exemplo n.º 3
0
function setSessionFromSubmittedData()
{
    $ci = BFCHelper::getStayParam('checkin', new DateTime());
    $isportal = get_option('isportal_key', 1);
    $currParam = array('searchid' => $_REQUEST['searchid'], 'newsearch' => isset($_REQUEST['newsearch']) ? $_REQUEST['newsearch'] : '0', 'checkin' => BFCHelper::getStayParam('checkin', new DateTime()), 'checkout' => BFCHelper::getStayParam('checkout', $ci->modify(BFCHelper::$defaultDaysSpan)), 'duration' => BFCHelper::getStayParam('duration'), 'paxages' => BFCHelper::getStayParam('paxages'), 'masterTypeId' => isset($_REQUEST['masterTypeId']) ? $_REQUEST['masterTypeId'] : '', 'merchantResults' => $isportal ? in_array($_REQUEST['merchantCategoryId'], BFCHelper::getCategoryMerchantResults($_REQUEST['cultureCode'])) : false, 'merchantCategoryId' => isset($_REQUEST['merchantCategoryId']) ? $_REQUEST['merchantCategoryId'] : 0, 'merchantId' => isset($_REQUEST['merchantId']) ? $_REQUEST['merchantId'] : 0, 'zoneId' => isset($_REQUEST['locationzone']) ? $_REQUEST['locationzone'] : 0, 'locationzone' => isset($_REQUEST['locationzone']) ? $_REQUEST['locationzone'] : 0, 'cultureCode' => isset($_REQUEST['cultureCode']) ? $_REQUEST['cultureCode'] : 0, 'paxes' => $_REQUEST['persons'], 'resourceName' => isset($_REQUEST['resourceName']) ? $_REQUEST['resourceName'] : 0, 'refid' => isset($_REQUEST['refid']) ? $_REQUEST['refid'] : 0, 'condominiumsResults' => isset($_REQUEST['condominiumsResults']) ? $_REQUEST['condominiumsResults'] : '', 'pricerange' => isset($_REQUEST['pricerange']) ? $_REQUEST['pricerange'] : '', 'onlystay' => $_REQUEST['onlystay'], 'resourceId' => isset($_REQUEST['resourceId']) ? $_REQUEST['resourceId'] : '', 'extras' => isset($_REQUEST['extras']) ? $_REQUEST['extras'] : '', 'packages' => isset($_REQUEST['packages']) ? $_REQUEST['packages'] : '', 'pricetype' => isset($_REQUEST['pricetype']) ? $_REQUEST['pricetype'] : '', 'rateplanId' => isset($_REQUEST['pricetype']) ? $_REQUEST['pricetype'] : '', 'variationPlanId' => isset($_REQUEST['variationPlanId']) ? $_REQUEST['variationPlanId'] : '', 'gotCalculator' => isset($_REQUEST['gotCalculator']) ? $_REQUEST['gotCalculator'] : '', 'totalDiscounted' => isset($_SESSION['search.params']['totalDiscounted']) ? $_SESSION['search.params']['totalDiscounted'] : '', 'suggestedstay' => isset($_SESSION['search.params']['suggestedstay']) ? $_SESSION['search.params']['suggestedstay'] : '');
    $_SESSION['search.params'] = $currParam;
}
Exemplo n.º 4
0
 protected function populateState($ordering = NULL, $direction = NULL)
 {
     $resourceId = JRequest::getInt('resourceId');
     $defaultRequest = array('resourceId' => JRequest::getInt('resourceId'), 'state' => BFCHelper::getStayParam('state'));
     //echo var_dump($defaultRequest);die();
     $this->setState('params', $defaultRequest);
     return parent::populateState($ordering, $direction);
 }
Exemplo n.º 5
0
 function CheckAvailabilityCalendarFromlList()
 {
     $resourcesId = JRequest::getVar('resourcesId');
     $checkIn = BFCHelper::getStayParam('checkin', null);
     $duration = BFCHelper::getStayParam('duration');
     if (!isset($duration)) {
         $duration = BFCHelper::$defaultDaysSpan;
     }
     $checkOut = null;
     if (isset($checkIn)) {
         $checkOut = BFCHelper::getStayParam('checkout', $checkIn->modify($duration));
     }
     $return = BFCHelper::getCheckAvailabilityCalendarFromlList($resourcesId, $checkIn, $checkOut);
     echo $return;
     $app = JFactory::getApplication();
     $app->close();
 }
Exemplo n.º 6
0
 protected function populateState($ordering = NULL, $direction = NULL)
 {
     //(in_array(JRequest::getInt('merchantCategoryId'), BFCHelper::getCategoryMerchantResults(JRequest::getVar('cultureCode')), true))
     $ci = BFCHelper::getStayParam('checkin', new DateTime());
     //		$isMerchantResults = false;
     //		if( (in_array(JRequest::getInt('masterTypeId'), BFCHelper::getTypologiesMerchantResults(), true) || (in_array(JRequest::getInt('merchantCategoryId'), BFCHelper::getCategoryMerchantResults(), true))){
     //			$isMerchantResults = true;
     //		}
     //		if (JRequest::getInt('masterTypeId') > 0 || JRequest::getInt('merchantCategoryId') > 0) {
     //		$condominiumsResults = JRequest::getVar('condominiumsResults');
     //		$merchantResults = (in_array(JRequest::getInt('merchantCategoryId'), BFCHelper::getCategoryMerchantResults(JRequest::getVar('cultureCode')), false));
     //		if ($condominiumsResults) {
     //			$merchantResults = false;
     //		}
     if (JRequest::getInt('newsearch') == 1) {
         $condominiumsResults = JRequest::getVar('condominiumsResults');
         $merchantResults = in_array(JRequest::getInt('merchantCategoryId'), BFCHelper::getCategoryMerchantResults(JRequest::getVar('cultureCode')), false);
         if ($condominiumsResults) {
             $merchantResults = false;
         }
         $filtersservices = JRequest::getVar('filtersservices');
         $bookableonly = JRequest::getVar('bookableonly');
         $filters = JRequest::getVar('filters');
         if (empty($filters)) {
             $filters = array();
         }
         if (!empty($bookableonly)) {
             $filters['bookingtypes'] = $bookableonly;
         }
         if (!empty($filtersservices)) {
             if (empty($filters['services'])) {
                 $filters['services'] = $filtersservices;
             } else {
                 $filters['services'] .= ',' . $filtersservices;
             }
         }
         $currParam = array('searchid' => "booking", 'checkin' => BFCHelper::getStayParam('checkin', new DateTime()), 'checkout' => BFCHelper::getStayParam('checkout', $ci->modify(BFCHelper::$defaultDaysSpan)), 'duration' => BFCHelper::getStayParam('duration'), 'paxages' => BFCHelper::getStayParam('paxages'), 'masterTypeId' => JRequest::getInt('masterTypeId'), 'merchantResults' => $merchantResults, 'merchantCategoryId' => JRequest::getInt('merchantCategoryId'), 'merchantId' => JRequest::getInt('merchantId', 0), 'zoneId' => JRequest::getInt('locationzone', 0), 'locationzone' => JRequest::getInt('locationzone', 0), 'cultureCode' => JRequest::getVar('cultureCode'), 'paxes' => JRequest::getInt('persons'), 'resourceName' => JRequest::getVar('resourceName', ""), 'refid' => JRequest::getVar('refid', ""), 'condominiumsResults' => $condominiumsResults, 'pricerange' => JRequest::getVar('pricerange'), 'onlystay' => JRequest::getVar('onlystay'), 'tags' => JRequest::getVar('tags'), 'filters' => $filters, 'bookableonly' => JRequest::getVar('bookableonly'), 'newsearch' => 1);
         $this->setState('params', $currParam);
     } else {
         // try to get params from session
         $pars = BFCHelper::getSearchParamsSession();
         try {
             $tags = JRequest::getVar('tags');
             if (isset($pars['tags']) && empty($tags)) {
                 $tags = $pars['tags'];
             }
             $currParam = array('searchid' => "booking", 'checkin' => $pars['checkin'], 'checkout' => $pars['checkout'], 'duration' => $pars['duration'], 'masterTypeId' => $pars['masterTypeId'], 'merchantResults' => $pars['merchantResults'], 'merchantCategoryId' => $pars['merchantCategoryId'], 'merchantId' => $pars['merchantId'], 'paxes' => $pars['paxes'], 'paxages' => $pars['paxages'], 'locationzone' => $pars['zoneId'], 'cultureCode' => $pars['cultureCode'], 'resourceName' => $pars['resourceName'], 'refid' => $pars['refid'], 'condominiumsResults' => $pars['condominiumsResults'], 'pricerange' => $pars['pricerange'], 'onlystay' => JRequest::getVar('onlystay', $pars['onlystay']), 'filters' => JRequest::getVar('filters', $pars['filters']), 'bookableonly' => JRequest::getVar('bookableonly', $pars['bookableonly']), 'tags' => $tags, 'newsearch' => JRequest::getVar('newsearch', "0"));
         } catch (Exception $e) {
             $condominiumsResults = JRequest::getVar('condominiumsResults');
             $merchantResults = in_array(JRequest::getInt('merchantCategoryId'), BFCHelper::getCategoryMerchantResults(JRequest::getVar('cultureCode')), false);
             if ($condominiumsResults) {
                 $merchantResults = false;
             }
             $filtersservices = JRequest::getVar('filtersservices');
             $bookableonly = JRequest::getVar('bookableonly');
             $filters = JRequest::getVar('filters');
             if (empty($filters)) {
                 $filters = array();
             }
             if (!empty($bookableonly)) {
                 $filters['bookingtypes'] = $bookableonly;
             }
             if (!empty($filtersservices)) {
                 if (empty($filters['services'])) {
                     $filters['services'] = $filtersservices;
                 } else {
                     $filters['services'] .= ',' . $filtersservices;
                 }
             }
             $currParam = array('searchid' => "booking", 'checkin' => BFCHelper::getStayParam('checkin', new DateTime()), 'checkout' => BFCHelper::getStayParam('checkout', $ci->modify(BFCHelper::$defaultDaysSpan)), 'duration' => BFCHelper::getStayParam('duration'), 'paxages' => BFCHelper::getStayParam('paxages'), 'masterTypeId' => JRequest::getInt('masterTypeId'), 'merchantResults' => $merchantResults, 'merchantCategoryId' => JRequest::getInt('merchantCategoryId'), 'merchantId' => JRequest::getInt('merchantId', 0), 'zoneId' => JRequest::getInt('locationzone', 0), 'locationzone' => JRequest::getInt('locationzone', 0), 'cultureCode' => JRequest::getVar('cultureCode'), 'paxes' => JRequest::getInt('persons'), 'resourceName' => JRequest::getVar('resourceName', ""), 'refid' => JRequest::getVar('refid', ""), 'condominiumsResults' => $condominiumsResults, 'pricerange' => JRequest::getVar('pricerange'), 'onlystay' => JRequest::getVar('onlystay'), 'tags' => JRequest::getVar('tags'), 'filters' => $filters, 'bookableonly' => JRequest::getVar('bookableonly'), 'newsearch' => 1);
         }
         $this->setState('params', $currParam);
     }
     //		$filter_order = JRequest::getCmd('filter_order','stay');
     //		$filter_order_Dir = JRequest::getCmd('filter_order_Dir','asc');
     $filter_order = JRequest::getCmd('filter_order');
     $filter_order_Dir = JRequest::getCmd('filter_order_Dir');
     //		return parent::populateState($filter_order, $filter_order_Dir);
     parent::populateState($filter_order, $filter_order_Dir);
 }
Exemplo n.º 7
0
 protected function populateState($ordering = NULL, $direction = NULL)
 {
     //$ci = clone BFCHelper::getStayParam('checkin', new DateTime());
     //recupero la prima data disponibile per la risorsa se riesco altrimenti recupero la prima data disponibile
     $resourceId = JRequest::getInt('resourceId');
     if (isset($resourceId)) {
         $dates = $this->getCheckInDatesFromService($resourceId, null);
         if (($pos = strpos($dates, ',')) !== false) {
             $dates = explode(",", $dates);
         }
         if (is_array($dates)) {
             $tmpDate1 = array_values($dates);
             $tmpDate = array_shift($tmpDate1);
             $defaultDate = DateTime::createFromFormat('Ymd', $tmpDate);
             //				$defaultDate = DateTime::createFromFormat('Ymd',array_shift(array_values($dates)));
         } elseif ($dates != '') {
             $defaultDate = DateTime::createFromFormat('Ymd', $dates);
         }
     }
     if (!isset($defaultDate)) {
         $defaultDate = DateTime::createFromFormat('d/m/Y', BFCHelper::getStartDate());
     }
     $ci = clone BFCHelper::getStayParam('checkin', $defaultDate);
     $defaultRequest = array('resourceId' => JRequest::getInt('resourceId'), 'checkin' => BFCHelper::getStayParam('checkin', $defaultDate), 'checkout' => BFCHelper::getStayParam('checkout', $ci->modify(BFCHelper::$defaultDaysSpan)), 'duration' => BFCHelper::getStayParam('duration'), 'paxages' => BFCHelper::getStayParam('paxages'), 'extras' => BFCHelper::getStayParam('extras'), 'packages' => BFCHelper::getStayParam('packages'), 'pricetype' => BFCHelper::getStayParam('pricetype'), 'rateplanId' => BFCHelper::getStayParam('rateplanId'), 'variationPlanId' => BFCHelper::getStayParam('variationPlanId'), 'state' => BFCHelper::getStayParam('state'), 'gotCalculator' => JRequest::getBool('calculate'));
     //		echo "<pre>defaultRequest";
     //		echo print_r($defaultRequest);
     //		echo "</pre>";
     $stayrequest = JRequest::getVar('stayrequest');
     // support for rsforms!
     if ($stayrequest == null || $stayrequest == '') {
         $form = JRequest::getVar('form');
         $stayrequest = htmlspecialchars_decode($form['stayrequest'], ENT_COMPAT);
     }
     if ($stayrequest != null && $stayrequest != '') {
         try {
             $params = json_decode($stayrequest);
             $defaultRequest = array('resourceId' => $params->resourceId, 'checkin' => DateTime::createFromFormat('d/m/Y', $params->checkin), 'checkout' => DateTime::createFromFormat('d/m/Y', $params->checkout), 'duration' => $params->duration, 'paxages' => $params->paxages, 'extras' => $params->extras, 'packages' => $params->packages, 'pricetype' => $params->pricetype, 'rateplanId' => $params->rateplanId, 'variationPlanId' => $params->variationPlanId, 'state' => $params->state, 'gotCalculator' => false, 'fromExtForm' => true, 'hasRateplans' => false);
         } catch (Exception $e) {
         }
     }
     //echo var_dump($defaultRequest);die();
     $this->setState('params', $defaultRequest);
     return parent::populateState();
 }
 function getCompleteRateplansStay()
 {
     $language = JRequest::getVar('language');
     $resourceId = JRequest::getVar('resourceId');
     //		$merchantId=JRequest::getVar('merchantId');
     $ratePlanId = JRequest::getVar('pricetype');
     $variationPlanId = JRequest::getVar('variationPlanId');
     $selectablePrices = BFCHelper::getStayParam('extras');
     $pricetype = JRequest::getVar('pricetype');
     $checkIn = BFCHelper::getStayParam('checkin', null);
     $duration = BFCHelper::getStayParam('duration');
     if (!isset($duration)) {
         $duration = BFCHelper::$defaultDaysSpan;
     }
     $packages = BFCHelper::getStayParam('packages');
     $paxages = BFCHelper::getStayParam('paxages', null);
     $return = null;
     //		$return = $language.$resourceId.$merchantId;
     $return = BFCHelper::getCompleteRateplansStayFromParameter($resourceId, $checkIn, $duration, $paxages, $selectablePrices, $packages, $pricetype, $ratePlanId, $variationPlanId);
     if (!empty($return)) {
         $return = json_encode($return);
     }
     echo $return;
     $app = JFactory::getApplication();
     $app->close();
 }
Exemplo n.º 9
0
$this->document->setTitle($resourceName . ' - ' . $merchant->Name);
$this->document->setDescription(BFCHelper::getLanguage($resource->Description, $this->language));
$merchantRules = "";
if (isset($merchant->Rules)) {
    $merchantRules = BFCHelper::getLanguage($merchant->Rules, $this->language, null, array('ln2br' => 'ln2br', 'striptags' => 'striptags'));
}
$resourceRules = "";
if (isset($resource->Rules)) {
    $resourceRules = BFCHelper::getLanguage($resource->Rules, $this->language, null, array('ln2br' => 'ln2br', 'striptags' => 'striptags'));
}
if (!empty($resource->ServiceIdList)) {
    $services = BFCHelper::GetServicesByIds($resource->ServiceIdList, $this->language);
}
$routeRating = JRoute::_('index.php?option=com_bookingforconnector&layout=ratings&view=resource&resourceId=' . $resource->ResourceId . ':' . BFCHelper::getSlug($resourceName), true, -1);
$formRoute = JRoute::_('index.php?option=com_bookingforconnector&view=resource&resourceId=' . $resource->ResourceId . ':' . BFCHelper::getSlug($resourceName));
$searchedRequest = array('pricetype' => BFCHelper::getStayParam('pricetype'), 'rateplanId' => BFCHelper::getStayParam('rateplanId'), 'variationPlanId' => BFCHelper::getStayParam('variationPlanId'), 'state' => BFCHelper::getStayParam('state'), 'gotCalculator' => JRequest::getBool('calculate'));
?>
<div class="com_bookingforconnector_resource com_bookingforconnector_resource-mt<?php 
echo $merchant->MerchantTypeId;
?>
">	
	
	<h2 class="com_bookingforconnector_resource-name"><?php 
echo $resourceName;
?>
 </h2>
	<div class="com_bookingforconnector_resource-address">
		<span class="street-address"><?php 
echo $indirizzo;
?>
</span>, <span class="postal-code "><?php 
Exemplo n.º 10
0
 protected function populateState($ordering = NULL, $direction = NULL)
 {
     //(in_array(JRequest::getInt('merchantCategoryId'), BFCHelper::getCategoryMerchantResults(JRequest::getVar('cultureCode')), true))
     $ci = BFCHelper::getStayParam('checkin', new DateTime());
     //		$isMerchantResults = false;
     //		if( (in_array(JRequest::getInt('masterTypeId'), BFCHelper::getTypologiesMerchantResults(), true) || (in_array(JRequest::getInt('merchantCategoryId'), BFCHelper::getCategoryMerchantResults(), true))){
     //			$isMerchantResults = true;
     //		}
     //		if (JRequest::getInt('masterTypeId') > 0 || JRequest::getInt('merchantCategoryId') > 0) {
     if (JRequest::getInt('newsearch') == 1) {
         $currParam = array('searchid' => "booking", 'checkin' => BFCHelper::getStayParam('checkin', new DateTime()), 'checkout' => BFCHelper::getStayParam('checkout', $ci->modify(BFCHelper::$defaultDaysSpan)), 'duration' => BFCHelper::getStayParam('duration'), 'paxages' => BFCHelper::getStayParam('paxages'), 'masterTypeId' => JRequest::getInt('masterTypeId'), 'merchantResults' => in_array(JRequest::getInt('merchantCategoryId'), BFCHelper::getCategoryMerchantResults(JRequest::getVar('cultureCode')), true), 'merchantCategoryId' => JRequest::getInt('merchantCategoryId'), 'merchantId' => JRequest::getInt('merchantId', 0), 'zoneId' => JRequest::getInt('locationzone', 0), 'locationzone' => JRequest::getInt('locationzone', 0), 'cultureCode' => JRequest::getVar('cultureCode'), 'paxes' => JRequest::getInt('persons'), 'resourceName' => JRequest::getVar('resourceName', ""), 'refid' => JRequest::getVar('refid', ""), 'condominiumsResults' => JRequest::getVar('condominiumsResults'), 'pricerange' => JRequest::getVar('pricerange'), 'onlystay' => JRequest::getVar('onlystay'), 'newsearch' => 1);
         $this->setState('params', $currParam);
     } else {
         // try to get params from session
         $pars = BFCHelper::getSearchParamsSession();
         //$filterpost = FormHelper::getOptionsFromSelect($_POST, 'filters');
         //			$filterpost = JRequest::getVar('filters', $pars['filters']);
         //			echo "<pre>_POST:";
         //			echo print_r($_POST);
         //			echo "</pre>";
         //			echo "<pre>filters:";
         //			echo print_r($filterpost);
         //			echo "</pre>";
         //			if (!isset($filterpost)) {
         //				$filterpost = $pars['filters'];
         //			}
         $currParam = array('searchid' => "booking", 'checkin' => $pars['checkin'], 'checkout' => $pars['checkout'], 'duration' => $pars['duration'], 'masterTypeId' => $pars['masterTypeId'], 'merchantResults' => $pars['merchantResults'], 'merchantCategoryId' => $pars['merchantCategoryId'], 'merchantId' => $pars['merchantId'], 'paxes' => $pars['paxes'], 'paxages' => $pars['paxages'], 'locationzone' => $pars['zoneId'], 'cultureCode' => $pars['cultureCode'], 'resourceName' => $pars['resourceName'], 'refid' => $pars['refid'], 'condominiumsResults' => $pars['condominiumsResults'], 'pricerange' => $pars['pricerange'], 'onlystay' => JRequest::getVar('onlystay', $pars['onlystay']), 'filters' => JRequest::getVar('filters', $pars['filters']), 'newsearch' => JRequest::getVar('newsearch', "0"));
         $this->setState('params', $currParam);
     }
     //		$filter_order = JRequest::getCmd('filter_order','stay');
     //		$filter_order_Dir = JRequest::getCmd('filter_order_Dir','asc');
     $filter_order = JRequest::getCmd('filter_order');
     $filter_order_Dir = JRequest::getCmd('filter_order_Dir');
     return parent::populateState($filter_order, $filter_order_Dir);
 }
Exemplo n.º 11
0
 protected function populateState($ordering = NULL, $direction = NULL)
 {
     $defaultRequest = array('tagId' => JRequest::getInt('tagId'), 'category' => JRequest::getInt('category'), 'show_grouped' => JRequest::getInt('show_grouped'), 'newsearch' => JRequest::getInt('newsearch'), 'state' => BFCHelper::getStayParam('state'));
     //echo var_dump($defaultRequest);die();
     $this->setState('params', $defaultRequest);
     $filter_order = JRequest::getCmd('filter_order', 'Order');
     $filter_order_Dir = JRequest::getCmd('filter_order_Dir', 'asc');
     return parent::populateState($filter_order, $filter_order_Dir);
 }