|
@@ -89,6 +89,8 @@ class HelperSearch |
|
@@ -89,6 +89,8 @@ class HelperSearch |
89
|
$result['shopEntry'] = isset($data['shop']) && !empty($data['shop']) ? self::shop($data['shop'], $data['sort']['sort']) : array();
|
89
|
$result['shopEntry'] = isset($data['shop']) && !empty($data['shop']) ? self::shop($data['shop'], $data['sort']['sort']) : array();
|
90
|
//分页
|
90
|
//分页
|
91
|
$result['pager'] = self::pager($result['totalCount'],$options['viewNum']-1);
|
91
|
$result['pager'] = self::pager($result['totalCount'],$options['viewNum']-1);
|
|
|
92
|
+ //浏览记录
|
|
|
93
|
+ $result['latestWalk'] = array();
|
92
|
//选中条件
|
94
|
//选中条件
|
93
|
$result['filters']['checkedConditions'] = self::getSelected();
|
95
|
$result['filters']['checkedConditions'] = self::getSelected();
|
94
|
if (isset($options['controller']) && $options['controller'] == 'Search') {
|
96
|
if (isset($options['controller']) && $options['controller'] == 'Search') {
|
|
@@ -134,7 +136,7 @@ class HelperSearch |
|
@@ -134,7 +136,7 @@ class HelperSearch |
134
|
if (!empty($val['default_images'])) {
|
136
|
if (!empty($val['default_images'])) {
|
135
|
$val['default_images'] = Images::getImageUrl($val['default_images'],$imgSize[0],$imgSize[1]);
|
137
|
$val['default_images'] = Images::getImageUrl($val['default_images'],$imgSize[0],$imgSize[1]);
|
136
|
}
|
138
|
}
|
137
|
- $goods[] = array(
|
139
|
+ $good = array(
|
138
|
'tags' => array(
|
140
|
'tags' => array(
|
139
|
'isNew' => $isNew,
|
141
|
'isNew' => $isNew,
|
140
|
'isLimit' => $isLimit
|
142
|
'isLimit' => $isLimit
|
|
@@ -143,12 +145,16 @@ class HelperSearch |
|
@@ -143,12 +145,16 @@ class HelperSearch |
143
|
'thumb' => $val['default_images'],
|
145
|
'thumb' => $val['default_images'],
|
144
|
'name' => $val['product_name'],
|
146
|
'name' => $val['product_name'],
|
145
|
'salePrice' => $val['sales_price'],
|
147
|
'salePrice' => $val['sales_price'],
|
146
|
- 'marketPrice' => $val['market_price'],
|
|
|
147
|
'isFew' => $isFew,
|
148
|
'isFew' => $isFew,
|
148
|
'skn' => $val['product_skn'],
|
149
|
'skn' => $val['product_skn'],
|
149
|
'showColBtn' => true,
|
150
|
'showColBtn' => true,
|
150
|
'coled' => true
|
151
|
'coled' => true
|
151
|
);
|
152
|
);
|
|
|
153
|
+ //市场价不等于售价时显示
|
|
|
154
|
+ if ($val['market_price'] != $val['sales_price']) {
|
|
|
155
|
+ $good['marketPrice'] = $val['market_price'];
|
|
|
156
|
+ }
|
|
|
157
|
+ $goods[] = $good;
|
152
|
}
|
158
|
}
|
153
|
return $goods;
|
159
|
return $goods;
|
154
|
}
|
160
|
}
|
|
@@ -459,14 +465,14 @@ class HelperSearch |
|
@@ -459,14 +465,14 @@ class HelperSearch |
459
|
{
|
465
|
{
|
460
|
$params = self::$params;
|
466
|
$params = self::$params;
|
461
|
$paramsValue = array_filter($params);
|
467
|
$paramsValue = array_filter($params);
|
462
|
- if (!$isAjax && empty($paramsValue)) {
|
|
|
463
|
- return array();
|
|
|
464
|
- }
|
|
|
465
|
$sizeId = isset($params['size']) && !empty($params['size']) ? $params['size'] : '';
|
468
|
$sizeId = isset($params['size']) && !empty($params['size']) ? $params['size'] : '';
|
466
|
if (isset($params['size'])) {
|
469
|
if (isset($params['size'])) {
|
467
|
unset($params['size']);
|
470
|
unset($params['size']);
|
468
|
}
|
471
|
}
|
469
|
$result = array();
|
472
|
$result = array();
|
|
|
473
|
+ if (!$isAjax && empty($paramsValue)) {
|
|
|
474
|
+ return array();
|
|
|
475
|
+ }
|
470
|
if (isset($filter['size']) && !empty($filter['size'])) {
|
476
|
if (isset($filter['size']) && !empty($filter['size'])) {
|
471
|
$size = $filter['size'];
|
477
|
$size = $filter['size'];
|
472
|
foreach ($size as $k=> $v) {
|
478
|
foreach ($size as $k=> $v) {
|
|
@@ -485,7 +491,7 @@ class HelperSearch |
|
@@ -485,7 +491,7 @@ class HelperSearch |
485
|
'checked' => isset(self::$params['size']) && self::$params['size'] == $v['size_id'] ? true : false
|
491
|
'checked' => isset(self::$params['size']) && self::$params['size'] == $v['size_id'] ? true : false
|
486
|
);
|
492
|
);
|
487
|
}
|
493
|
}
|
488
|
- if (self::checkSearch('size')) {
|
494
|
+ if ( self::checkSearch('size')) {
|
489
|
return array();
|
495
|
return array();
|
490
|
}
|
496
|
}
|
491
|
}
|
497
|
}
|
|
@@ -940,8 +946,8 @@ class HelperSearch |
|
@@ -940,8 +946,8 @@ class HelperSearch |
940
|
}
|
946
|
}
|
941
|
if ($data) {
|
947
|
if ($data) {
|
942
|
$result['conditions'] = $data;
|
948
|
$result['conditions'] = $data;
|
|
|
949
|
+ $result['clearUrl'] = self::current();
|
943
|
}
|
950
|
}
|
944
|
- $result['clearUrl'] = self::current();
|
|
|
945
|
return $result;
|
951
|
return $result;
|
946
|
}
|
952
|
}
|
947
|
|
953
|
|