Showing
1 changed file
with
16 additions
and
3 deletions
@@ -627,7 +627,15 @@ class HelperSearch | @@ -627,7 +627,15 @@ class HelperSearch | ||
627 | //设置已选中价格 | 627 | //设置已选中价格 |
628 | if (!empty($priceId)) { | 628 | if (!empty($priceId)) { |
629 | $price = explode(',' ,$priceId); | 629 | $price = explode(',' ,$priceId); |
630 | - $customName = isset($price[1]) && $price[1] == 99999 ? '¥'.$price[0].'以上' : '¥' . intval($price[0]-1) . '-' . intval($price[1]); | 630 | + if (isset($price[1]) && empty($price[1])) { |
631 | + $customName = '¥' . intval($price[0]) . '-99999'; | ||
632 | + } | ||
633 | + elseif (isset($price[1]) && $price[1] == 99999) { | ||
634 | + $customName = '¥'.intval($price[0]-1).'以上'; | ||
635 | + } | ||
636 | + else { | ||
637 | + $customName = '¥' . intval($price[0]) . '-' . intval($price[1]); | ||
638 | + } | ||
631 | $name = isset($filter['price'][$priceId]) ? $filter['price'][$priceId] : $customName; | 639 | $name = isset($filter['price'][$priceId]) ? $filter['price'][$priceId] : $customName; |
632 | self::$selected['price'] = array( | 640 | self::$selected['price'] = array( |
633 | 'name' => $name, | 641 | 'name' => $name, |
@@ -866,10 +874,12 @@ class HelperSearch | @@ -866,10 +874,12 @@ class HelperSearch | ||
866 | } | 874 | } |
867 | $result = array( | 875 | $result = array( |
868 | 'name' => '最新', | 876 | 'name' => '最新', |
869 | - 'href' => isset(self::$params['order']) && self::$params['order'] == 's_t_desc' ? self::buildUrl($params) : self::buildUrl(array_merge($params, array( | 877 | + 'href' => isset(self::$params['order']) && self::$params['order'] == 's_t_desc' ? self::buildUrl(array_merge($params, array( |
870 | 'order' => 's_t_asc' | 878 | 'order' => 's_t_asc' |
879 | + ))) : self::buildUrl(array_merge($params, array( | ||
880 | + 'order' => 's_t_desc' | ||
871 | ))) , | 881 | ))) , |
872 | - 'active' => isset(self::$params['order']) && self::$params['order'] == 's_t_asc' ? true : '' | 882 | + 'active' => isset(self::$params['order']) && self::$params['order'] == 's_t_desc' ? true : '' |
873 | ); | 883 | ); |
874 | return $result; | 884 | return $result; |
875 | } | 885 | } |
@@ -1338,6 +1348,9 @@ class HelperSearch | @@ -1338,6 +1348,9 @@ class HelperSearch | ||
1338 | elseif ($controller == 'list' && $action == 'sale') { | 1348 | elseif ($controller == 'list' && $action == 'sale') { |
1339 | $type = isset(self::$params['discount']) && self::$params['discount'] ? self::$params['discount'] : '0,0.9'; | 1349 | $type = isset(self::$params['discount']) && self::$params['discount'] ? self::$params['discount'] : '0,0.9'; |
1340 | } | 1350 | } |
1351 | + elseif ($controller == 'sale' && $action == 'index') { | ||
1352 | + $type = isset(self::$params['specialsale_id']) && self::$params['specialsale_id'] ? self::$params['specialsale_id'] : ''; | ||
1353 | + } | ||
1341 | // 品牌 | 1354 | // 品牌 |
1342 | elseif ($controller == 'list' && $action == 'sale') { | 1355 | elseif ($controller == 'list' && $action == 'sale') { |
1343 | $type = isset(self::$params['brandId']) && self::$params['brandId'] ? self::$params['brandId'] : ''; | 1356 | $type = isset(self::$params['brandId']) && self::$params['brandId'] ? self::$params['brandId'] : ''; |
-
Please register or login to post a comment