...
|
...
|
@@ -319,7 +319,7 @@ class HelperSearch |
|
|
}
|
|
|
}
|
|
|
$result['list'] = $sortList;
|
|
|
|
|
|
// print_r($result); exit;
|
|
|
return $result;
|
|
|
}
|
|
|
|
...
|
...
|
@@ -427,13 +427,15 @@ class HelperSearch |
|
|
unset($params['brand']);
|
|
|
//设置已选中的品牌
|
|
|
foreach ($brandIds as $key => $val) {
|
|
|
$brandParam = $brandIds;
|
|
|
unset($brandParam[$key]);
|
|
|
$params['brand'] = implode(',', $brandParam);
|
|
|
self::$selected['brand'][] = array(
|
|
|
'name' => $brandAll[$val],
|
|
|
'href' => self::buildUrl($params)
|
|
|
);
|
|
|
if (isset($brandAll[$val])) {
|
|
|
$brandParam = $brandIds;
|
|
|
unset($brandParam[$key]);
|
|
|
$params['brand'] = implode(',', $brandParam);
|
|
|
self::$selected['brand'][] = array(
|
|
|
'name' => $brandAll[$val],
|
|
|
'href' => self::buildUrl($params)
|
|
|
);
|
|
|
}
|
|
|
}
|
|
|
ksort($brandList);
|
|
|
//品牌列表排序, 添加品牌索引
|
...
|
...
|
@@ -474,7 +476,7 @@ class HelperSearch |
|
|
$result = array();
|
|
|
if (isset($filter['size']) && !empty($filter['size'])) {
|
|
|
$size = $filter['size'];
|
|
|
foreach ($size as $v) {
|
|
|
foreach ($size as $k=> $v) {
|
|
|
//设置选中
|
|
|
if ($v['size_id'] == $sizeId) {
|
|
|
self::$selected['size'] = array(
|
...
|
...
|
@@ -482,12 +484,12 @@ class HelperSearch |
|
|
'href' => self::buildUrl($params)
|
|
|
);
|
|
|
}
|
|
|
|
|
|
$result[] = array(
|
|
|
'name' => $v['size_name'],
|
|
|
'href' => self::buildUrl(array_merge($params, array(
|
|
|
'size' => $v['size_id']
|
|
|
))) ,
|
|
|
'checked' => isset(self::$params['size']) && self::$params['size'] == $v['size_id'] ? true : false
|
|
|
);
|
|
|
}
|
|
|
if (self::checkSearch('size')) {
|
...
|
...
|
@@ -579,6 +581,7 @@ class HelperSearch |
|
|
'href' => self::buildUrl(array_merge($params, array(
|
|
|
'price' => $key
|
|
|
))) ,
|
|
|
'checked' => isset(self::$params['price']) && self::$params['price'] == $key ? true : false
|
|
|
);
|
|
|
}
|
|
|
return $result;
|
...
|
...
|
@@ -1213,11 +1216,9 @@ class HelperSearch |
|
|
|
|
|
public static function getClassesUrl($condition)
|
|
|
{
|
|
|
|
|
|
$condition['sales'] = 'Y'; //在销售商品分类
|
|
|
$condition['status'] = 1; //上架商品分类
|
|
|
$condition['stocknumber'] = 1; //过滤掉已售罄
|
|
|
|
|
|
return Yohobuy::httpBuildQuery(self::getUrl('sort'), $condition);
|
|
|
}
|
|
|
|
...
|
...
|
|