Authored by 周少峰

全部折扣重复

... ... @@ -112,8 +112,6 @@ class HelperSearch
$result['leftContent'][]['allSort'] = isset($data['sort']) ? self::groupSort($data['sort']['sort']) : array();
//一周新品上架
$result['leftContent'][]['newSales'] = isset($data['recent']) ? self::recentShelve($data['recent']['recent']) : array();
//全部折扣
$result['leftContent'][]['allDiscount'] = isset($data['discount']) ? self::getDiscount($data['discount']['discount']) : array();
//品牌banner
$result['brandBanner'] = isset($data['banner']) && isset($data['brand']) ? self::getBannerFormat($data['banner'],$data['brand']) : array();
//总记录数
... ... @@ -558,7 +556,12 @@ class HelperSearch
}else{
$price = explode(',', $priceId);
if (count($price) == 2) {
if (!$price[0]) {
$price[0] = 0;
}
if (!$price[1]) {
$price[1] = 99999;
}
self::$selected['price'] = array(
'name' => self::$params['price'] == '2000,99999' ? '¥2000以上' : '¥' . (int)$price[0] . '-' . (int)$price[1],
'href' => self::buildurl($params)
... ... @@ -595,6 +598,12 @@ class HelperSearch
if (isset($params['price']) && !isset($filter['price'][$priceId]) ) {
$price = explode(',', $params['price']);
unset($params['price']);
if (!$price[0]) {
$price[0] = 0;
}
if (!$price[1]) {
$price[1] = 99999;
}
$result = array(
'min' => $price[0],
'max' => $price[1]
... ...