@@ -29,6 +29,12 @@ $yes = array
2 => '否',
);
+$sku_type = array
+(
+ 1 => '库存不足时不显示商品',
+ 2 => '库存不足时显示商品',
+);
+
$column = function()
{
$array = array();
@@ -201,6 +207,19 @@ $config = array
//'list' => true,
),
+ 'sku_type' => array
+ (
+ 'type' => 'int-11',
+ 'name' => '商品库存',
+ 'default' => '1',
+ 'desc' => '商品库存',
+ 'match' => 'is_numeric',
+ 'update' => 'radio',
+ 'option' => $sku_type,
+ //'list' => true,
+ //'edit' => true,
+ ),
'tag_id' => array
(
'type' => 'varchar-800',
@@ -164,7 +164,10 @@ class Info
$d = $this->getGoodsInfo($where['shop_id'], $v, false, true, true, $uid);
if ($d) {
if ($d['total'] <= 0) {
- $result_2[] = $d;
+ if ($d['sku_type'] == 2) {
+ $result_2[] = $d;
+ }
+ // $result_2[] = $d;
} else {
$result_1[] = $d;
}