@@ -247,9 +247,14 @@ class Info
$where['sku_id'] = $sku_id;
}
+ $total = 1;
$other = Dever::db('shop/goods_sku')->getData($where);
if (!$other && $check) {
- return false;
+ if ($check == -1) {
+ $total = 2;
+ } else {
+ return false;
+ }
$data = Dever::load('goods/lib/info')->getInfo($info, $attr, array($other, array('total')));
@@ -277,6 +282,10 @@ class Info
} else {
$data['total'] = $this->getTotal($other, $sku_id);
+
+ if ($total == 2) {
+ $data['total'] = 0;
return $data;
@@ -85,7 +85,7 @@ class Buy extends Core
Dever::alert('错误的商品');
- $this->data['goods'] = Dever::load('shop/lib/info')->getGoodsInfo($this->shop_id, $id, false, true, false);
+ $this->data['goods'] = Dever::load('shop/lib/info')->getGoodsInfo($this->shop_id, $id, false, true, -1);
//$this->data['shop'] = $this->shop;