Authored by 周少峰

活动专区from参数

... ... @@ -627,7 +627,15 @@ class HelperSearch
//设置已选中价格
if (!empty($priceId)) {
$price = explode(',' ,$priceId);
$customName = isset($price[1]) && $price[1] == 99999 ? '¥'.$price[0].'以上' : '¥' . intval($price[0]-1) . '-' . intval($price[1]);
if (isset($price[1]) && empty($price[1])) {
$customName = '¥' . intval($price[0]) . '-99999';
}
elseif (isset($price[1]) && $price[1] == 99999) {
$customName = '¥'.intval($price[0]-1).'以上';
}
else {
$customName = '¥' . intval($price[0]) . '-' . intval($price[1]);
}
$name = isset($filter['price'][$priceId]) ? $filter['price'][$priceId] : $customName;
self::$selected['price'] = array(
'name' => $name,
... ... @@ -866,10 +874,12 @@ class HelperSearch
}
$result = array(
'name' => '最新',
'href' => isset(self::$params['order']) && self::$params['order'] == 's_t_desc' ? self::buildUrl($params) : self::buildUrl(array_merge($params, array(
'href' => isset(self::$params['order']) && self::$params['order'] == 's_t_desc' ? self::buildUrl(array_merge($params, array(
'order' => 's_t_asc'
))) : self::buildUrl(array_merge($params, array(
'order' => 's_t_desc'
))) ,
'active' => isset(self::$params['order']) && self::$params['order'] == 's_t_asc' ? true : ''
'active' => isset(self::$params['order']) && self::$params['order'] == 's_t_desc' ? true : ''
);
return $result;
}
... ... @@ -1338,6 +1348,9 @@ class HelperSearch
elseif ($controller == 'list' && $action == 'sale') {
$type = isset(self::$params['discount']) && self::$params['discount'] ? self::$params['discount'] : '0,0.9';
}
elseif ($controller == 'sale' && $action == 'index') {
$type = isset(self::$params['specialsale_id']) && self::$params['specialsale_id'] ? self::$params['specialsale_id'] : '';
}
// 品牌
elseif ($controller == 'list' && $action == 'sale') {
$type = isset(self::$params['brandId']) && self::$params['brandId'] ? self::$params['brandId'] : '';
... ...