...
|
...
|
@@ -177,8 +177,15 @@ class HelperSearch |
|
|
self::setSearchNav($data['product']['total']);
|
|
|
}
|
|
|
//品牌店铺信息
|
|
|
if (isset($data['shop']) && !empty($data['shop']) && isset($data['shopSort'])) {
|
|
|
$result['shopEntry'] = self::shop($data['shop'], $data['shopSort']);
|
|
|
if (isset($data['shopData']) && !empty($data['shopData'])) {
|
|
|
$result['shopEntry'] = array();
|
|
|
foreach ($data['shopData'] as $val) {
|
|
|
$shopSort = self::shop($val['shop'], $val['shopSort']);
|
|
|
if (empty($shopSort)) {
|
|
|
continue;
|
|
|
}
|
|
|
$result['shopEntry'][] = $shopSort;
|
|
|
}
|
|
|
}
|
|
|
//分页
|
|
|
if (isset($result['totalCount'])) {
|
...
|
...
|
@@ -307,6 +314,11 @@ class HelperSearch |
|
|
$isNew = false;
|
|
|
$isSale = false;
|
|
|
}
|
|
|
|
|
|
if (isset($options['isNew']) && $options['isNew']) {
|
|
|
$isNew = true;
|
|
|
}
|
|
|
|
|
|
//SALE、NEW标签不共存
|
|
|
if ($isNew) {
|
|
|
$isSale = false;
|
...
|
...
|
@@ -323,7 +335,7 @@ class HelperSearch |
|
|
'name' => $val['product_name'],
|
|
|
'salePrice' => $val['sales_price'],
|
|
|
'brand' => array(
|
|
|
'url' => Helpers::url('', '', $val['brand_domain']),
|
|
|
'url' => Helpers::url('', '', isset($val['brand_domain']) ? $val['brand_domain'] : ''),
|
|
|
'name' => $val['brand_name']
|
|
|
),
|
|
|
'isFew' => $isFew,
|
...
|
...
|
@@ -1426,7 +1438,7 @@ class HelperSearch |
|
|
public static function shop($shop, $shopSort)
|
|
|
{
|
|
|
$shopEntry = array();
|
|
|
if (self::$total == 0) {
|
|
|
if (self::$total == 0 || empty($shopSort)) {
|
|
|
return $shopEntry;
|
|
|
}
|
|
|
$url = Helpers::url('', '', $shop['brand_domain']);
|
...
|
...
|
@@ -1446,6 +1458,7 @@ class HelperSearch |
|
|
$sort[] = $sortInfo;
|
|
|
}
|
|
|
}
|
|
|
$shop['brand_ico'] = strstr($shop['brand_ico'], '?', true);
|
|
|
$shopEntry['home'] = $url;
|
|
|
$shopEntry['logo'] = Images::getImageUrl($shop['brand_ico'], 80, 50, 1, 'brandLogo');
|
|
|
$shopEntry['shopName'] = $shop['brand_name'];
|
...
|
...
|
|