function _ProcessSearch() { $output = ""; $column = $this->column; if (empty($column)) { echo "<p>No options available</p>"; die; } if ($column == 'prodbrandid') { $selected_value = $_GET['brand']; // To get the originial value so tht it is not shown again in the list $_REQUEST['brand'] = ""; // Making the variable as empty so that all the list can be taken } else { if ($column == 'categories') { $selected_value = $_GET['catg_name']; // To get the originial value so tht it is not shown again in the list $_REQUEST[$column] = ""; // Making the variable as empty so that all the list can be taken $_GET['search_query'] = $_REQUEST['search_query'] = str_ireplace($selected_value, '', MakeURLNormal($_REQUEST['search_query'])); } else { $selected_value = isset($_GET[$column]) ? $_GET[$column] : ''; // To get the originial value so tht it is not shown again in the list $_GET[$column] = $_REQUEST[$column] = ""; // Making the variable as empty so that all the list can be taken } } $selected_value = MakeURLNormal($selected_value); $GLOBALS['ISC_CLASS_NEWSEARCH'] = GetClass('ISC_NEWSEARCH'); $params = $GLOBALS['ISC_CLASS_NEWSEARCH']->_searchterms; /* Adding clerance paramter for clearance page - vikas */ if (isset($this->items['clearance'])) { $params['clearance'] = 1; unset($this->items['clearance']); } switch ($column) { case 'categories': $output = $this->searchcategories($params, $selected_value); break; default: //$output = $this->searchotherfilters($params,$selected_value); //NI Cloud.Liu 2010-05-28 //modify YMM logic to read from cache file first //if fail reading file then get info from original logic $ymm_tmp_column = isset($_GET['column']) ? MakeURLSafe($_GET['column']) : ""; $ymm_tmp_year = isset($_GET['year']) ? MakeURLSafe($_GET['year']) : ""; $ymm_tmp_make = isset($_GET['make']) ? MakeURLSafe($_GET['make']) : ""; $ymm_tmp_model = isset($_GET['model']) ? MakeURLSafe($_GET['model']) : ""; $fn = 'column=' . $ymm_tmp_column . '_year=' . $ymm_tmp_year . '_make=' . $ymm_tmp_make . '_model=' . $ymm_tmp_model; $fc = new file_cache($fn); $cache = $fc->get_cache(); //NI Cloud.Liu 2010-06-11 //accomplish make info if select column is model if ($cache && strtolower($column) === 'model' && isset($params['year'])) { $cache = str_replace('/make/' . $params['make'], '/make/' . $params['make'] . '/year/' . $params['year'], $cache); } //accomplish category and other info if (isset($cache)) { $NewLink = ''; if (isset($params['category'])) { $NewLink .= "/category/" . MakeURLSafe(strtolower($params['category'])); } if (isset($params['brand'])) { $NewLink .= "/brand/" . MakeURLSafe($params['brand']); } if (isset($params['series'])) { $NewLink .= "/series/" . MakeURLSafe($params['series']); } if (isset($params['searchtext'])) { $NewLink .= "/searchtext/" . MakeURLSafe(strtolower($params['searchtext'])); } if (isset($params['search'])) { $NewLink .= "/searchtext/" . MakeURLSafe(strtolower($params['search'])); } if (isset($_REQUEST['abtesting']) && $_REQUEST['abtesting'] != "") { $NewLink = "/a-b-testing/" . MakeURLSafe(strtolower($_REQUEST['abtesting'])); } else { if (isset($params["search_query"]) && $params["search_query"] != '') { $NewLink = "/" . MakeURLSafe(strtolower($params['search_query'])) . $NewLink; } } if (isset($NewLink) && $NewLink != '') { $cache = str_replace($GLOBALS["ShopPath"], $GLOBALS["ShopPath"] . $NewLink, $cache); } /* For clearance page, need to add clearance as the first paramter in URL to redirect to clearance page - vikas */ if (isset($params['clearance'])) { $cache = str_replace($GLOBALS["ShopPath"], $GLOBALS["ShopPath"] . "/clearance", $cache); } } $output = $cache ? $cache : $this->searchotherfilters($params, $selected_value); break; } return $output; }