Authored by 郝肖肖

店铺 传shopId

... ... @@ -746,10 +746,10 @@ class HelperSearch
unset($params['color']);
}
$result = array();
$color = $filter['color'];
if (!isset($color) && empty($color)) {
if (!isset($filter['color']) && empty($filter['color'])) {
return $result;
}
$color = $filter['color'];
if (isset($color['color_id'])) {
$checked = isset(self::$params['color']) && self::$params['color'] ==$color['color_id'] ? true : false;
$result[] = array(
... ... @@ -1453,7 +1453,7 @@ class HelperSearch
break 2;
}
$sortInfo = array();
$sortInfo['href'] = $url . '/?msort=' . $msort['sort_id'] . '&misort=' . $misort['sort_id'];
$sortInfo['href'] = "{$url}/?msort={$msort['sort_id']}&misort={$misort['sort_id']}&shopId={$shop['shop_id']}";
$sortInfo['name'] = $misort['sort_name'];
$sort[] = $sortInfo;
}
... ...
... ... @@ -103,7 +103,7 @@ class ShopModel
);
$sort = self::getSort($res['sort'], $parameters['options']['misort'], $shopId);
$searchCondition['userInput'] = empty($searchCondition['userInput']) ? array() : $searchCondition['userInput'];
$param = array_merge($searchCondition['userInput'], array('navBar' => 1));
$param = array_merge($searchCondition['userInput'], array('navBar' => 1, 'shopId' => $shopId));
$data['allGoods']['list'] = $result['goods'];
$data['allGoods']['name'] = '全部商品 ALL';
$data['allGoods']['opts'] = $result['opts'];
... ... @@ -273,20 +273,20 @@ class ShopModel
$shopNav = array(
array(
'name' => '店铺首页',
'url' => '/?navBar=0',
'url' => '/?navBar=0&shopId=' . $parameters['shopId'],
),
array(
'name' => '全部商品',
'url' => self::$shopListUrl . '?navBar=1',
'url' => self::$shopListUrl . '?navBar=1&shopId=' . $parameters['shopId'],
'arrow' => true,
),
array(
'name' => '人气单品',
'url' => self::$shopListUrl . '?navBar=2&order=s_n_desc',
'url' => self::$shopListUrl . '?navBar=2&order=s_n_desc&shopId=' . $parameters['shopId'],
),
array(
'name' => '新品上架',
'url' => self::$shopListUrl . '?navBar=3&order=s_t_desc',
'url' => self::$shopListUrl . '?navBar=3&order=s_t_desc&shopId=' . $parameters['shopId'],
),
);
... ... @@ -426,6 +426,7 @@ class ShopModel
'url' => Helpers::url(
self::$shopListUrl,
array(
'shopId' => $parameters['shopId'],
'brand' => $resource['id'],
'navBar' => 1
),
... ...
... ... @@ -31,8 +31,13 @@ class IndexController extends WebAction
$type = intval(isset($result['type']) ? $result['type'] : '');
switch ($type) {
case 1:
$shopId = $this->get('shopId', 0);
if (empty($shopId)) {
//无单品店有多品店:1--->搜索页
$this->go('http://search.yohobuy.com/?query=' . $domain);
} else {
$this->shopHome($shopId);
}
exit(0);
break;
case 2:
... ... @@ -318,7 +323,8 @@ class IndexController extends WebAction
),
'uid' => $uid,
'navBar' => $this->get('navBar', 0),
'brand' => $this->get('brand', 0)
'brand' => $this->get('brand', 0),
'shopId' => $shopId
);
$data = array_merge(
... ... @@ -339,16 +345,11 @@ class IndexController extends WebAction
{
//品牌域名,没有获取到品牌域名的跳转首页
$domain = $this->param('named');
//根据品牌域名获取品牌id(同时判断品牌域名是否有效),无效跳转首页
$result = BrandsModel::getBrandByDomain($domain);
if (isset($result['code']) && $result['code'] !== 200 || empty($result['shopId'])) {
if (empty($domain)) {
$this->go(SITE_MAIN);
}
$shopId = $result['shopId'];
$shopId = $this->get('shopId', 0);
//获取uid
$uid = $this->getUid();
... ... @@ -365,6 +366,7 @@ class IndexController extends WebAction
),
'uid' => $uid,
'navBar' => $this->get('navBar', 1),
'shopId' => $this->get('shopId', 0),
'brand' => $this->get('brand', 0)
);
... ...