Authored by biao

Merge branch 'hotfix/limit'

... ... @@ -204,7 +204,7 @@ class DetailModel
$totalStorageNum = 0; // 总库存数
foreach ($baseInfo['goodsList'] as $value) {
// 如果status为0,即skc下架时就跳过该商品
if ($value['status'] === 0) {
if ($value['status'] === 0 && $baseInfo['isLimitBuy'] !== 'Y') {
continue;
}
... ... @@ -314,9 +314,10 @@ class DetailModel
);
$soldOut = ($baseInfo['status'] == 0 || $totalStorageNum === 0);
$notForSale = $baseInfo['attribute'] == 2;
$willSale = ($baseInfo['showStatus'] === 1 && $baseInfo['saleStatus'] === 0);
// 显示加入购物车链接
if (!$soldOut && !$notForSale) {
if ($willSale || (!$soldOut && !$notForSale)) {
ksort($colorGroup, SORT_NUMERIC);
$result['cartInfo']['productId'] = $productId;
... ...