Authored by hf

code review by fei.hong: do fixes bug to product brand shops show images

... ... @@ -341,15 +341,15 @@
</div>
<div class="material-content">
{{# material}}
{{#if detail}}
{{#if materialDetail}}
<ul class="material-detail">
{{# detail}}
{{# materialDetail}}
<li class="clearfix">
<img src="{{img}}">
<p class="name">{{name}}<br>{{enName}}</p>
<p class="text">{{text}}</p>
</li>
{{/ detail}}
{{/ materialDetail}}
</ul>
{{/if}}
... ...
... ... @@ -34,6 +34,7 @@ class ItemModel
$statGoodsInfo = array();
$banner = array();
$baseInfo = ItemData::baseInfo($productId, $uid, $productSkn);
if(empty($baseInfo['productName']) && empty($baseInfo['erpProductId']) && empty($baseInfo['productPriceBo'])) {
return array();
}
... ... @@ -108,7 +109,6 @@ class ItemModel
// 是否收藏
$goodsInfo['isCollect'] = $favoriteData['product'];
// 限购商品
if ($baseInfo['isLimitBuy'] === 'Y') {
// 是否开售
... ... @@ -118,6 +118,7 @@ class ItemModel
if (isset($baseInfo['showStatus'])) {
$showStatus = intval($baseInfo['showStatus']);
}
$fashTopGoods = self::getFashionTopGoodsStatus($uid, $showStatus, $isBeginSale);
//潮流尖货状态
$goodsInfo['fashionTopGoods'] = array(
... ... @@ -134,8 +135,7 @@ class ItemModel
$goodsInfo['dis'] = $fashTopGoods['dis'];//是否失效
$goodsInfo['buyNow'] = $fashTopGoods['buyNow'];//是否立即购买
}
}
}
$soldOut = $baseInfo['status'] == 0 || $totalStorageNum === 0;
$notForSale = $baseInfo['attribute'] == 2;//非卖品
$virtualGoods = $baseInfo['attribute'] == 3;//虚拟商品
... ... @@ -783,9 +783,9 @@ class ItemModel
if (!empty($sizeInfo['productMaterialList'])) {
//商品材质[洗涤说明]
$material['detail'] = array();
$material['materialDetail'] = array();
foreach ($sizeInfo['productMaterialList'] as $value) {
$material['detail'][] = array(
$material['materialDetail'][] = array(
'img' => $value['imageUrl'],
'name' => $value['caption'],
'enName' => $value['encaption'],
... ... @@ -870,7 +870,7 @@ class ItemModel
foreach ($baseInfo['goodsList'] as $pos => $value) {
// 如果status为0,即skc下架时就跳过该商品
if ($value['status'] === 0) {
if ($value['status'] === 0 || empty($value['colorImage'])) {
continue;
}
if (isset($value['goodsImagesList'])) {
... ... @@ -1177,6 +1177,7 @@ class ItemModel
$result['hasLimitedCode'] = true;
$result['limitedCodeSoldOut'] = true;
$result['getLimitedCode'] = false;
break;
case 6: // 开售前,即将开售(用户已领取限购码)
$result['openSoon'] = true;
... ...
... ... @@ -88,7 +88,7 @@ class IndexController extends WebAction
$nodeContent = BrandData::getByNodeContent($node);
if (isset($nodeContent['code']) && $nodeContent['code'] == 200) {
echo $nodeContent['data'];
echo '<br>', $nodeContent['data'];
}
}
... ...
... ... @@ -20,6 +20,7 @@ class ItemController extends WebAction
}
$uid = $this->getUid();
$vipLevel = -1;
$sortNames = array();
if(!empty($this->_vip)) {
$vipLevel = Helpers::getVipLevel($this->_vip);
}
... ... @@ -28,10 +29,11 @@ class ItemController extends WebAction
if(empty($productInfo)) {
$this->error();
}
$sortNames = array();
$navs = ItemModel::getSortNav($productInfo['goodsInfo']['smallSortId']);
foreach($navs as $nav) {
$sortNames[] = $nav['name'];
if(!empty($navs)) {
foreach($navs as $nav) {
$sortNames[] = $nav['name'];
}
}
$seo = $this->getSeoByGoodsInfo($productInfo['goodsInfo'], $navs);
$this->setTitle($seo['title'], true, '|');
... ... @@ -83,10 +85,11 @@ class ItemController extends WebAction
if(empty($productInfo)) {
$this->error();
}
$navs = ItemModel::getSortNav($productInfo['goodsInfo']['smallSortId']);
foreach($navs as $nav) {
$sortNames[] = $nav['name'];
if(!empty($navs)) {
foreach($navs as $nav) {
$sortNames[] = $nav['name'];
}
}
$seo = $this->getSeoByGoodsInfo($productInfo['goodsInfo'], $navs);
$this->setTitle($seo['title'], true, '|');
... ...