当前位置: 首页>>代码示例>>PHP>>正文


PHP BFCHelper::getCategoryMerchantResults方法代码示例

本文整理汇总了PHP中BFCHelper::getCategoryMerchantResults方法的典型用法代码示例。如果您正苦于以下问题:PHP BFCHelper::getCategoryMerchantResults方法的具体用法?PHP BFCHelper::getCategoryMerchantResults怎么用?PHP BFCHelper::getCategoryMerchantResults使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在BFCHelper的用法示例。


在下文中一共展示了BFCHelper::getCategoryMerchantResults方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: populateState

 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);
 }
开发者ID:Bookingfor,项目名称:joomla-extension-v-2,代码行数:80,代码来源:search.php

示例2: setSessionFromSubmittedData

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;
}
开发者ID:Bookingfor,项目名称:wordpress-plugin,代码行数:7,代码来源:bfi.php

示例3: populateState

 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);
 }
开发者ID:Bookingfor,项目名称:joomla-extension,代码行数:35,代码来源:search.php


注:本文中的BFCHelper::getCategoryMerchantResults方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。