|
@@ -74,8 +74,7 @@ class HelperSearch |
|
@@ -74,8 +74,7 @@ class HelperSearch |
74
|
$result = array();
|
74
|
$result = array();
|
75
|
self::$params = $_GET;
|
75
|
self::$params = $_GET;
|
76
|
self::$options = $options;
|
76
|
self::$options = $options;
|
77
|
-// unset(self::$params['/']);
|
|
|
78
|
-// unset(self::$params['page']);
|
77
|
+ unset(self::$params['page']);
|
79
|
self::$filter = isset($data['product']['filter']) ? $data['product']['filter'] : array();
|
78
|
self::$filter = isset($data['product']['filter']) ? $data['product']['filter'] : array();
|
80
|
//产品列表
|
79
|
//产品列表
|
81
|
$result['goods'] = isset($data['product']['product_list']) ? self::getProductList($data['product']['product_list'], $options['imgSize']) : array();
|
80
|
$result['goods'] = isset($data['product']['product_list']) ? self::getProductList($data['product']['product_list'], $options['imgSize']) : array();
|
|
@@ -558,6 +557,7 @@ class HelperSearch |
|
@@ -558,6 +557,7 @@ class HelperSearch |
558
|
$result = array();
|
557
|
$result = array();
|
559
|
$color = $filter['color'];
|
558
|
$color = $filter['color'];
|
560
|
foreach ($color as $v) {
|
559
|
foreach ($color as $v) {
|
|
|
560
|
+ $checked = false;
|
561
|
//设置已选中
|
561
|
//设置已选中
|
562
|
if ($v['color_id'] == $colorId) {
|
562
|
if ($v['color_id'] == $colorId) {
|
563
|
$background = empty($v['color_value']) ? '#' . $v['color_code'] : "url(" . $v['color_value'] . ")";
|
563
|
$background = empty($v['color_value']) ? '#' . $v['color_code'] : "url(" . $v['color_value'] . ")";
|
|
@@ -565,6 +565,7 @@ class HelperSearch |
|
@@ -565,6 +565,7 @@ class HelperSearch |
565
|
'color' => $background,
|
565
|
'color' => $background,
|
566
|
'href' => self::buildUrl($params)
|
566
|
'href' => self::buildUrl($params)
|
567
|
);
|
567
|
);
|
|
|
568
|
+ $checked = true;
|
568
|
}
|
569
|
}
|
569
|
$result[] = array(
|
570
|
$result[] = array(
|
570
|
'name' => $v['color_name'],
|
571
|
'name' => $v['color_name'],
|
|
@@ -572,6 +573,7 @@ class HelperSearch |
|
@@ -572,6 +573,7 @@ class HelperSearch |
572
|
'href' => self::buildUrl(array_merge($params, array(
|
573
|
'href' => self::buildUrl(array_merge($params, array(
|
573
|
'color' => $v['color_id']
|
574
|
'color' => $v['color_id']
|
574
|
))) ,
|
575
|
))) ,
|
|
|
576
|
+ 'checked' => $checked
|
575
|
);
|
577
|
);
|
576
|
}
|
578
|
}
|
577
|
if (self::checkSearch('color')) {
|
579
|
if (self::checkSearch('color')) {
|
|
@@ -1298,11 +1300,15 @@ class HelperSearch |
|
@@ -1298,11 +1300,15 @@ class HelperSearch |
1298
|
}
|
1300
|
}
|
1299
|
//新品到着
|
1301
|
//新品到着
|
1300
|
elseif ($controller == 'list' && $action == 'new') {
|
1302
|
elseif ($controller == 'list' && $action == 'new') {
|
1301
|
- $type = '';
|
1303
|
+ if (isset(self::$params['shelve_time'])) {
|
|
|
1304
|
+ $date = explode(',', self::$params['shelve_time']);
|
|
|
1305
|
+ $date = date('Y-m-d', $date[0]);
|
|
|
1306
|
+ }
|
|
|
1307
|
+ $type = $date;
|
1302
|
}
|
1308
|
}
|
1303
|
//list - sale
|
1309
|
//list - sale
|
1304
|
elseif ($controller == 'list' && $action == 'sale') {
|
1310
|
elseif ($controller == 'list' && $action == 'sale') {
|
1305
|
- $type = isset(self::$params['discount']) && self::$params['discount'] ? self::$params['discount'] : '';
|
1311
|
+ $type = isset(self::$params['discount']) && self::$params['discount'] ? self::$params['discount'] : '0,0.9';
|
1306
|
}
|
1312
|
}
|
1307
|
// 品牌
|
1313
|
// 品牌
|
1308
|
elseif ($controller == 'list' && $action == 'sale') {
|
1314
|
elseif ($controller == 'list' && $action == 'sale') {
|