Authored by 郝肖肖

brand_id 未返回变量判断

... ... @@ -1446,9 +1446,14 @@ class HelperSearch
public static function shop($shop, $shopSort)
{
$shopEntry = array();
if (self::$total == 0 || empty($shopSort)) {
if (self::$total == 0) {
return $shopEntry;
}
if (empty($shopSort)) {
$shopSort = array();
}
$shop['shop_id'] = empty($shop['shop_id']) ? '' : $shop['shop_id'];
$url = Helpers::url('', array('shopId' => $shop['shop_id']), $shop['brand_domain']);
... ...
... ... @@ -241,10 +241,13 @@ class SearchModel
if (!empty($shopsByBrands['data']) && is_array($shopsByBrands['data'])) {
//多品店 店铺入口
foreach ($shopsByBrands['data'] as $val) {
if (isset($val['brand_id'])) {
$shopSort = SearchData::getClassesData(array('brand' => $val['brand_id']));
if (isset($shopSort['code']) && $shopSort['code'] == 200) {
$data['shopData'][] = array('shop' => $val, 'shopSort' => $shopSort['data']['sort']);
}
$data['shopData'][] = array(
'shop' => $val,
'shopSort' => empty($shopSort['data']['sort']) ? array() : $shopSort['data']['sort']
);
}
} else {
//品牌入口
... ...