public static function getCategoryMerchantResults($language = '') { // if (self::isMerchantBehaviour()) { // return array(); // } $groupOnSearch = array(); $merchantCategories = BFCHelper::getMerchantCategoriesForRequest($language); if (!empty($merchantCategories)) { $groupOnSearch = array_unique(array_map(function ($i) { if ($i->GroupOnSearch) { return $i->MerchantCategoryId; } return 0; }, $merchantCategories)); } return $groupOnSearch; //return array(COM_BOOKINGFORCONNECTOR_CATEGORIES_GROUPING_RESULT_INTO_MERCHANT); }
$paxages = $pars['paxages']; } if ($pars['checkout'] == null) { $checkout->modify($checkoutspan); } if (!empty($pars['zoneId'])) { $zoneId = $pars['zoneId']; } if (!empty($pars['bookableonly'])) { $bookableonly = $pars['bookableonly']; } } if ($checkin == $checkout) { $checkout->modify($checkoutspan); } $merchantCategories = BFCHelper::getMerchantCategoriesForRequest($language); $listmerchantCategories = array(); $listmerchantCategories[] = JHTML::_('select.option', 0, JTEXT::_('MOD_BOOKINGFORSEARCH_SELECT')); if (!empty($merchantCategories)) { foreach ($merchantCategories as $mc) { $listmerchantCategories[] = JHTML::_('select.option', $mc->MerchantCategoryId, $mc->Name); } } $persons = array(JHTML::_('select.option', '1', JText::_('1')), JHTML::_('select.option', '2', JText::_('2')), JHTML::_('select.option', '3', JText::_('3')), JHTML::_('select.option', '4', JText::_('4')), JHTML::_('select.option', '5', JText::_('5')), JHTML::_('select.option', '6', JText::_('6')), JHTML::_('select.option', '7', JText::_('7')), JHTML::_('select.option', '8', JText::_('8')), JHTML::_('select.option', '9', JText::_('9')), JHTML::_('select.option', '10', JText::_('10'))); $nad = 0; if (empty($paxages)) { $nad = 2; } $nch = 0; $nse = 0; $countPaxes = array_count_values($paxages);