...
|
...
|
@@ -638,6 +638,7 @@ class HelperSearch |
|
|
$styleNum = 0;
|
|
|
$styleName = '';
|
|
|
foreach ($style as $v) {
|
|
|
$checked = false;
|
|
|
//选中的筛选条件
|
|
|
if (in_array($v['style_id'], $styleIds)) {
|
|
|
if (!$styleNum) {
|
...
|
...
|
@@ -656,6 +657,7 @@ class HelperSearch |
|
|
$url = self::buildUrl(array_merge($params, array(
|
|
|
'style' => implode(',', $selectedStyle)
|
|
|
)));
|
|
|
$checked = true;
|
|
|
}
|
|
|
//该风格url参数中添加该风格的id
|
|
|
else {
|
...
|
...
|
@@ -668,6 +670,7 @@ class HelperSearch |
|
|
'id' => $v['style_id'],
|
|
|
'name' => $v['style_name'],
|
|
|
'href' => $url,
|
|
|
'checked' => $checked
|
|
|
);
|
|
|
}
|
|
|
if (isset(self::$params['style']) && !empty(self::$params['style'])) {
|
...
|
...
|
@@ -1256,16 +1259,37 @@ class HelperSearch |
|
|
*/
|
|
|
public static function fromPram($url, $position, $abEnabled = false)
|
|
|
{
|
|
|
$type = '';
|
|
|
$itemFrom = ChannelConfig::$itemFromStats;
|
|
|
|
|
|
$controller = isset(self::$options['controller']) ? strtolower(self::$options['controller']) : '';
|
|
|
$action = isset(self::$options['action']) ? strtolower(self::$options['action']) : '';
|
|
|
//列表页面
|
|
|
if ($controller == 'list' && $action == 'index') {
|
|
|
$type = isset(self::$params['msort']) && self::$params['msort'] ? self::$params['msort'] : '';
|
|
|
}
|
|
|
//新品到着
|
|
|
elseif ($controller == 'list' && $action == 'new') {
|
|
|
$type = '';
|
|
|
}
|
|
|
//list - sale
|
|
|
elseif ($controller == 'list' && $action == 'sale') {
|
|
|
$type = isset(self::$params['discount']) && self::$params['discount'] ? self::$params['discount'] : '';
|
|
|
}
|
|
|
// 品牌
|
|
|
elseif ($controller == 'list' && $action == 'sale') {
|
|
|
$type = isset(self::$params['brandId']) && self::$params['brandId'] ? self::$params['brandId'] : '';
|
|
|
}
|
|
|
// 搜索
|
|
|
elseif ($controller == 'search') {
|
|
|
$type = isset(self::$params['query']) && self::$params['query'] ? self::$params['query'] : '';
|
|
|
}
|
|
|
$itemIndex = $controller."_".$action;
|
|
|
//获取domain-module-$keyword_page_position{ab}
|
|
|
$ab = (isset($_COOKIE['ab_5']) && $abEnabled == true) ? '_'.$_COOKIE['ab_5'] : '';
|
|
|
$page = self::$page;
|
|
|
$keyword = isset(self::$options['query']) ? self::$options['query'] : '';
|
|
|
if (isset($itemFrom[$itemIndex])) {
|
|
|
$url .= "?from={$itemFrom[$itemIndex]['domain']}-{$itemFrom[$itemIndex]['module']}-{$keyword}_{$page}_{$position}{$ab}";
|
|
|
$url .= "?from={$itemFrom[$itemIndex]['domain']}-{$itemFrom[$itemIndex]['module']}-{$type}_{$page}_{$position}{$ab}";
|
|
|
}
|
|
|
return $url;
|
|
|
}
|
...
|
...
|
|