Beispiel #1
0
 public function assignSearchVar($selected_criterion = array())
 {
     $as4_smartyVarList = AdvancedSearchClass::getSearchsIdFromHook(-1);
     $this->_addToFBLog("Retrieve id_search by smarty variable");
     if (self::_isFilledArray($as4_smartyVarList)) {
         $searchs = AdvancedSearchClass::getSearchsFromHook(-1, $this->_cookie->id_lang);
         $location_name = $this->getLocationName($this->_cookie->id_lang);
         foreach ($searchs as $search) {
             $search['next_id_criterion_group'] = $this->getNextIdCriterionGroup((int) $search['id_search']);
             $this->_addToFBLog("Retrieve criterions by smarty variable");
             $search = $this->getCriterionsGroupsAndCriterionsForSearch(array(0 => $search), $this->_cookie->id_lang, $selected_criterion, array(), false);
             $this->_smarty->assign(array('as4_productFilterListSource' => self::$productFilterListSource, 'as4_productFilterListData' => isset(self::$productFilterListSource) && self::$productFilterListSource == 'search' && !empty(self::$productFilterListData) ? base64_encode(self::$productFilterListData) : '', 'as_searchs' => $search, 'hookName' => 'home', 'as_obj' => $this, 'as_path' => $this->_path, 'as_selected_criterion' => $selected_criterion, 'as_criteria_group_type_interal_name' => $this->criteria_group_type_interal_name, 'col_img_dir' => _PS_COL_IMG_DIR_, 'as_location_name' => $location_name));
             $this->_smarty->assign($search[0]['smarty_var_name'], $this->_smarty->fetch($this->_getTemplatePath('views/templates/hook/pm_advancedsearch.tpl')));
         }
     }
     return;
 }