Authored by yangyang

sale页分类链接去除specialsale_id的问题

... ... @@ -350,6 +350,14 @@ class HelperSearch
);
$sortList = array();
//specialsale_id参数加上
$specialsaleParam = array();
if (self::$options['controller'] == 'Sale') {
$specialsaleParam = array(
'specialsale_id' => isset(self::$params['specialsale_id']) ? self::$params['specialsale_id'] : ''
);
}
foreach ($sort as $key => $val) {
//是否有品牌
if ($options['action'] != 'brand' && $options['controller'] != 'Index') {
... ... @@ -379,13 +387,13 @@ class HelperSearch
$sortList[$key]['name'] = $val['sort_name'];
$sortList[$key]['active'] = isset(self::$params['msort']) && self::$params['msort'] == $val['sort_id'] ? true : false;
$sortList[$key]['childList'][] = array(
'name' => '全部分类',
'name' => '全部'.$val['sort_name'],
'href' => self::buildUrl(array_merge($gender, array('msort'=>$val['sort_id'])))
);
if (isset($val['sub']) && !empty($val['sub'])) {
foreach ($val['sub'] as $k => $v) {
$sortList[$key]['childList'][$k+1]['name'] = $v['sort_name'];
$sortList[$key]['childList'][$k+1]['href'] = self::buildUrl(array_merge($gender, array('msort' => $val['sort_id'], 'misort' => $v['sort_id'])));
$sortList[$key]['childList'][$k+1]['href'] = self::buildUrl(array_merge($gender, array('msort' => $val['sort_id'], 'misort' => $v['sort_id']), $specialsaleParam));
$sortList[$key]['childList'][$k+1]['childActive'] = isset(self::$params['misort']) && self::$params['misort'] == $v['sort_id'] ? true : false;
}
}
... ... @@ -1090,7 +1098,8 @@ class HelperSearch
*/
public static function current()
{
$url = explode('?', 'http://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']);
$url = explode('?', 'http://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']);
print_r($url[0]);
return $url[0];
}
/**
... ...
... ... @@ -29,7 +29,6 @@ class SaleController extends WebAction
} else {
$special = array();
}
$condition = array();
//传品牌ID参数
... ... @@ -50,7 +49,6 @@ class SaleController extends WebAction
);
$saleData = SaleModel::getSaleSearchData($condition, $options, $specialInfo);
$data = array(
//初始化js
'productListPage' => true,
... ...