public function displayNextStepSearch($id_search, $id_criterion_group, $with_product, $selected_criterion = array(), $selected_criterion_hidden = array())
{
$this->mobile_detect = new Mobile_Detect(); // Добавляем переменную которая проверяет
$this->_cleanOutput();
$ajaxMode = Tools::getValue('ajaxMode', false);
$this->includeAssets();
$searchs = As4SearchEngine::getSearch($id_search, (int)$this->context->language->id);
$json_return = array();
$hookName = As4SearchEngine::getHookName($searchs[0]['id_hook']);
$json_return['next_id_criterion_group'] = $this->getNextIdCriterionGroup($id_search);
As4SearchEngineLogger::log("Retrieve steps");
$searchs = $this->getCriterionsGroupsAndCriterionsForSearch($searchs, (int)$this->context->language->id, $selected_criterion, $with_product, $id_criterion_group);
$next_id_criterion_group = AdvancedSearchCriterionGroupClass::getNextIdCriterionGroup($id_search, $id_criterion_group);
As4SearchEngineLogger::log("Retrieve criterons and results 1");
$this->context->smarty->assign(array(
'as_searchs' => $searchs,
'as_search' => $searchs[0],
'hookName' => $hookName,
'criterions_group' => $searchs[0]['criterions_groups'][0],
'as_selected_criterion' => $selected_criterion,
'next_id_criterion_group' => $next_id_criterion_group,
));
if ($this->mobile_detect->isMobile()){ // Если моб устройство то выводим одну тпл
$json_return['html_criteria_block'] = $this->display(__FILE__, $this->templatePrefix . 'pm_advancedsearch_criterions-mobile.tpl');
} else { // Если десктоп то другую
$json_return['html_criteria_block'] = $this->display(__FILE__, $this->templatePrefix . 'pm_advancedsearch_criterions.tpl');
}
if ($searchs[0]['remind_selection'] == 3 || $searchs[0]['remind_selection'] == 2) {
if ($this->mobile_detect->isMobile()){
$json_return['html_selection_block'] = $this->display(__FILE__, $this->templatePrefix . 'pm_advancedsearch_selection_block-mobile.tpl');
} else {
$json_return['html_selection_block'] = $this->display(__FILE__, $this->templatePrefix . 'pm_advancedsearch_selection_block.tpl');
}
}