你好,我想在想在后台使用appserver 里面的/catalogsearch/index/product 的搜索功能,现在我把indexcontroller拷了过来,但是使用时无论搜索什么关键词都没搜索结果数据返回。我看了下 关键词这些都接收到了的,在services的search.php中
protected function actionGetSearchProductColl($select, $where, $pageNum, $numPerPage, $product_search_max_count, $filterAttr = [])
{
$currentLangCode = Yii::$service->store->currentLangCode;
if (!$currentLangCode) {
return;
}
$searchEngineList = $this->getAllChildServiceName();
if (is_array($searchEngineList) && !empty($searchEngineList)) {
foreach ($searchEngineList as $sE) {
$service = $this->{$sE};
$searchLang = $service->searchLang;
if (is_array($searchLang) && !empty($searchLang)) {
$searchLangCode = array_keys($searchLang);
// 如果当前store的语言,在当前的搜索引擎中支持,则会使用这个搜索,作为支持。
if (in_array($currentLangCode, $searchLangCode)) {
return $service->getSearchProductColl($select, $where, $pageNum, $numPerPage, $product_search_max_count, $filterAttr);
}
}
}
}
}
$currentLangCode = Yii::$service->store->currentLangCode;这行currentLangCode没有都到,请问下这要配置什么参数?谢谢