4 include_once
'Services/Payment/classes/class.ilShopBaseGUI.php';
30 parent::__construct();
32 if($this->cmd ==
'setFilter')
63 $next_class = $this->ctrl->getNextClass($this);
64 $cmd = $this->ctrl->getCmd();
68 $this->cmd =
'setFilter';
72 $this->cmd = $this->ctrl->getCmd();
80 $cmd =
'performSearch';
93 if(isset(
$_POST[
'search_combination']))
97 if(isset(
$_POST[
'search_string']))
102 if(isset(
$_POST[
'search_details']))
106 if(isset(
$_POST[
'search_topic']))
116 unset(
$_SESSION[
'shop_advanced_search']);
124 if(method_exists($this, $this->ctrl->getCmd()))
144 $result->filter(ROOT_FOLDER_ID, $query_parser->getCombination() ==
'and');
147 if(!count(
$result->getResults()))
159 include_once
'Services/Search/classes/class.ilQueryParser.php';
163 $query_parser->parse();
165 if (!$query_parser->validate())
167 return $query_parser->getMessage();
170 return $query_parser;
177 if((
bool)$this->settings->get(
'topics_allow_custom_sorting'))
194 $oSearchResult->setResultPageNumber((
int)
$_GET[
'page_number']);
196 include_once
'Services/Search/classes/class.ilObjectSearchFactory.php';
200 $obj_search->setFilterShopTopicId((
int)$this->
getTopicId());
201 $obj_search->setFilter($this->
getFilter());
202 $obj_search->setCustomSearchResultObject($oSearchResult);
203 $res = $obj_search->performSearch();
206 $meta_search_c->setMode(
'contribute');
207 $meta_search_c->setFilter($this->
getFilter());
208 $meta_search_c->setFilterShopTopicId((
int)$this->
getTopicId());
209 $meta_search_c->setCustomSearchResultObject($oSearchResult);
210 $res->mergeEntries($meta_search_c->performSearch());
213 $meta_search_t->setMode(
'title');
214 $meta_search_t->setFilter($this->
getFilter());
215 $meta_search_t->setCustomSearchResultObject($oSearchResult);
216 $meta_search_t->setFilterShopTopicId((
int)$this->
getTopicId());
217 $res->mergeEntries($meta_search_t->performSearch());
220 $meta_search_k->setMode(
'keyword');
221 $meta_search_k->setFilter($this->
getFilter());
222 $meta_search_k->setCustomSearchResultObject($oSearchResult);
223 $meta_search_k->setFilterShopTopicId((
int)$this->
getTopicId());
224 $res->mergeEntries($meta_search_k->performSearch());
231 foreach($this->
getDetails() as $key => $detail_type)
251 return $filter ? $filter : array();
256 $this->tpl->addBlockFile(
'ADM_CONTENT',
'adm_content',
'tpl.shop_advanced_search.html',
'Services/Payment');
257 include_once
'Services/Payment/classes/class.ilAdvancedSearchFilterGUI.php';
259 $filterGUI->initFilter();
260 if($this->cmd ==
'setFilter')
262 $filterGUI->writeFilterToSession();
266 $_SESSION[
'shop_advanced_search'] = array();
267 $filterGUI->resetFilter();
269 $this->tpl->setVariable(
'FILTER', $filterGUI->getHtml());
274 include_once
'Services/Payment/classes/class.ilShopResultPresentationGUI.php';
276 $this->tpl->setVariable(
'RESULTS', $search_result_presentation->showAdvancedSearchResults());
280 $this->tpl->setVariable(
'RESULTS', $this->lng->txt(
'payment_shop_not_objects_found'));
293 $_SESSION[
'shop_advanced_search'][
'combination'] = $this->combination = $a_combination;
297 return $this->combination ? $this->combination : self::SEARCH_OR;
301 $_SESSION[
'shop_advanced_search'][
'string'] = $this->
string = $a_str;
309 $_SESSION[
'shop_advanced_search'][
'details'] = $this->details = $a_details;
313 return $this->details ? $this->details : array();
317 $_SESSION[
'shop_advanced_search'][
'topic'] = $this->topic_id = $a_topic;
326 $_SESSION[
'shop_advanced_search'][
'order_direction'] = $this->sort_direction = $a_sort_direction;
334 $_SESSION[
'shop_advanced_search'][
'shop_order_field'] = $this->sort_field = $a_field;
344 if(ANONYMOUS_USER_ID == $ilUser->getId() &&
350 $_SESSION[
'shop_advanced_search'][
'order_topics_sorting_type'] = $this->sort_type_topics = $a_field;
356 if(ANONYMOUS_USER_ID == $ilUser->getId() &&
366 $_SESSION[
'shop_advanced_search'][
'shop_topics_sorting_direction'] = $this->sort_direction_topics = $a_sort_direction;
377 parent::prepareOutput();
379 $ilTabs->setTabActive(
'advanced_search');
searchObjects($query_parser)
setCombination($a_combination)
getSortingDirectionTopics()
const TOPICS_SORT_MANUALLY
setSortingDirectionTopics($a_sort_direction)
const TOPICS_SORT_BY_TITLE
Class ilAdvancedSearchFilterGUI.
setSortDirection($a_sort_direction)
Class ilShopResultPresentationGUI.
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
_getInstance($a_search_type)
const SHOP_ADVANCED_SEARCH
static _getShopMetaDataSearchInstance($query_parser)
get reference of LikeShopMetaDataSearch.
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
static _getShopObjectSearchInstance($query_parser)
get reference of LikeShopObjectSearch.
Class ilShopAdvancedSearchGUI.
setSortingTypeTopics($a_field)