Authored by 周少峰

品牌导航修改

@@ -290,7 +290,8 @@ class HelperSearch @@ -290,7 +290,8 @@ class HelperSearch
290 ); 290 );
291 foreach ($sort as $val) { 291 foreach ($sort as $val) {
292 if (isset($params['msort']) && $params['msort'] == $val['sort_id']) { 292 if (isset($params['msort']) && $params['msort'] == $val['sort_id']) {
293 - isset($option['brandName']) && $option['brandName'] ? self::$listnav[2]:self::$listnav[1] = array( 293 + $nav_index = isset($option['brandName']) && $option['brandName'] ? 2 : 1;
  294 + self::$listnav[$nav_index] = array(
294 'sort_id' => $val['sort_id'], 295 'sort_id' => $val['sort_id'],
295 'name' => $val['sort_name'], 296 'name' => $val['sort_name'],
296 'href' => self::buildurl(array( 297 'href' => self::buildurl(array(
@@ -324,7 +325,8 @@ class HelperSearch @@ -324,7 +325,8 @@ class HelperSearch
324 ); 325 );
325 foreach ($val['sub'] as $mval) { 326 foreach ($val['sub'] as $mval) {
326 if (isset($params['misort']) && $params['misort'] == $mval['sort_id']) { 327 if (isset($params['misort']) && $params['misort'] == $mval['sort_id']) {
327 - isset($option['brandName']) && $option['brandName'] ? self::$listnav[3]:self::$listnav[2] = array( 328 + $nav_index = isset($option['brandName']) && $option['brandName'] ? 3 : 2;
  329 + self::$listnav[$nav_index] = array(
328 'sort_id' => $mval['sort_id'], 330 'sort_id' => $mval['sort_id'],
329 'name' => $mval['sort_name'], 331 'name' => $mval['sort_name'],
330 'href' => '' 332 'href' => ''