Authored by Rock Zhang

有货判断商品详情页中商品是否售罄的逻辑

Code Review By Rock Zhang
... ... @@ -264,7 +264,7 @@ class DetailModel
'numInCart' => 0,
'goodsInstore' => $baseInfo['storage'], // 库存量
);
$soldOut = ($baseInfo['storage'] == 0) || ($baseInfo['status'] == 0);
$soldOut = ($baseInfo['storage'] == 0) || ($baseInfo['status'] == 0 || $totalStorageNum === 0);
$notForSale = $baseInfo['attribute'] == 2;
// 显示加入购物车链接
if (!$soldOut && !$notForSale) {
... ...