Skip to content

Commit 676f0b6

Browse files
分类页面的产品列表,无法通过name搜索产品的问题处理
1 parent a242f34 commit 676f0b6

File tree

1 file changed

+15
-3
lines changed

1 file changed

+15
-3
lines changed

app/appadmin/modules/Catalog/block/category/Product.php

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -107,14 +107,26 @@ public function getToolBar($numCount, $pageNum, $numPerPage)
107107
*/
108108
public function getSearchArr()
109109
{
110-
$data = [
111-
[ // 字符串类型
110+
$nameInput = [];
111+
if (Yii::$service->product->serviceStorageName() == 'mongodb') {
112+
$nameInput = [ // 字符串类型
112113
'type' => 'inputtext',
113114
'title' => 'Name',
114115
'name' => 'name',
115116
'columns_type' => 'string',
116117
'lang' => true,
117-
],
118+
];
119+
} else {
120+
$nameInput = [ // 字符串类型
121+
'type' => 'inputtext',
122+
'title' => 'Name',
123+
'name' => 'name',
124+
'columns_type' => 'string',
125+
'lang' => false,
126+
];
127+
}
128+
$data = [
129+
$nameInput,
118130
[ // 字符串类型
119131
'type' => 'inputtext',
120132
'title' => Yii::$service->page->translate->__('Spu'),

0 commit comments

Comments
 (0)