...
|
...
|
@@ -32,17 +32,16 @@ class HelperSearch |
|
|
{
|
|
|
$options = self::$options;
|
|
|
$channel = HomeModel::getSwitchChannel();
|
|
|
$uri = '/'.$channel;
|
|
|
|
|
|
$channelName = '/'.$channel;
|
|
|
if (isset($options['brandName']) && !empty($options['brandName'])) {
|
|
|
$brandNav = $options['brandNameEn'] . $options['brandNameCn'];
|
|
|
$brandNav = $options['brandNameEn'] . ' ' . $options['brandNameCn'];
|
|
|
self::$listNav = array(
|
|
|
array(
|
|
|
'href' => Helpers::url($uri),
|
|
|
'name' => strtoupper($channel).'首页'
|
|
|
'href' => Helpers::url($channelName),
|
|
|
'name' => strtoupper($channel) . '首页'
|
|
|
),
|
|
|
array(
|
|
|
'href' => '',
|
|
|
'href' => Helpers::url('/brands/brands'),
|
|
|
'name' => '品牌一览'
|
|
|
),
|
|
|
array(
|
...
|
...
|
@@ -52,13 +51,16 @@ class HelperSearch |
|
|
);
|
|
|
}else{
|
|
|
self::$listNav[0] = array(
|
|
|
'href' => Helpers::url($uri),
|
|
|
'href' => Helpers::url($channelName),
|
|
|
'name' => strtoupper($channel).'首页'
|
|
|
);
|
|
|
self::$listNav[1] = array(
|
|
|
if ($options['action'] == 'new') {
|
|
|
self::$listNav[1] = array(
|
|
|
'href' => '',
|
|
|
'name' => $options['action'] == 'new' ? '新品到着' : '列表'
|
|
|
);
|
|
|
'name' => '新品到着'
|
|
|
);
|
|
|
}
|
|
|
|
|
|
}
|
|
|
}
|
|
|
/**
|
...
|
...
|
@@ -77,15 +79,19 @@ class HelperSearch |
|
|
//产品列表
|
|
|
$result['goods'] = isset($data['product']['product_list']) ? self::getProductList($data['product']['product_list'], $options['imgSize']) : array();
|
|
|
//总页数
|
|
|
$result['page_total'] = isset($data['product']['page_total']) ? $data['product']['page_total'] : '';
|
|
|
self::$pageTotal = $result['page_total'];
|
|
|
self::$total = $data['product']['total'];
|
|
|
if (isset($data['product']['page_total'])) {
|
|
|
$result['page_total'] = $data['product']['page_total'];
|
|
|
self::$pageTotal = $result['page_total'];
|
|
|
}
|
|
|
if (isset($data['product']['total'])) {
|
|
|
self::$total = $data['product']['total'];
|
|
|
}
|
|
|
//当前页
|
|
|
self::$page = $result['page'] = isset($data['product']['page']) ? $data['product']['page'] : '';
|
|
|
//筛选条件
|
|
|
$result['filters'] = isset($data['product']['filter']) ? self::filter() : array();
|
|
|
//排序方式、显示数量等其他选项
|
|
|
$result['opts'] = isset($data['product']['filter']) ? self::getOpts() : array();
|
|
|
$result['opts'] = self::getOpts();
|
|
|
//下一页
|
|
|
if (isset($data['product']['page_total'])) {
|
|
|
$result['hasNextPage'] = self::next($data['product']['page_total']);
|
...
|
...
|
@@ -621,7 +627,7 @@ class HelperSearch |
|
|
//设置已选中价格
|
|
|
if (!empty($priceId)) {
|
|
|
$price = explode(',' ,$priceId);
|
|
|
$customName = self::$params['price'] == '2000,99999' ? '¥2000以上' : '¥' . (int)$price[0] . '-' . (int)$price[1];
|
|
|
$customName = isset($price[1]) && $price[1] == 99999 ? '¥'.$price[0].'以上' : '¥' . intval($price[0]-1) . '-' . intval($price[1]);
|
|
|
$name = isset($filter['price'][$priceId]) ? $filter['price'][$priceId] : $customName;
|
|
|
self::$selected['price'] = array(
|
|
|
'name' => $name,
|
...
|
...
|
@@ -1076,7 +1082,6 @@ class HelperSearch |
|
|
public static function current()
|
|
|
{
|
|
|
$url = explode('?', 'http://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']);
|
|
|
self::$listNav[0]['href'] = $url[0];
|
|
|
return $url[0];
|
|
|
}
|
|
|
/**
|
...
|
...
|
|