dever 3 years ago
parent
commit
cbe67566e9
2 changed files with 14 additions and 1 deletions
  1. 3 1
      app/goods/lib/Info.php
  2. 11 0
      app/shop/database/sell_order_goods.php

+ 3 - 1
app/goods/lib/Info.php

@@ -363,7 +363,7 @@ class Info
             $attr = $this->setAttr($info['category'], $key);
             $attr_data = $attr->one($info['id']);
 
-            $info['attr'] = $info['sell_attr'] = array();
+            $info['attr'] = $info['sell_attr'] = $info['option_attr'] = array();
 
             if ($attr->config['attr']) {
                 foreach ($attr->config['attr'] as $k => $v) {
@@ -554,6 +554,8 @@ class Info
             $info['price']['list'] = Dever::db('goods/info_sku')->getData($where);
             $info['price']['min'] = Dever::db('goods/info_sku')->getMinOne($where);
             $info['price']['max'] = Dever::db('goods/info_sku')->getMaxOne($where);
+        } elseif ($data['is_sell'] == 3) {
+            $info['option_attr'][] = $data;
         }
     }
 

+ 11 - 0
app/shop/database/sell_order_goods.php

@@ -88,6 +88,17 @@ return array
             'match'     => 'is_numeric',
         ),
 
+        'attr'      => array
+        (
+            'type'      => 'text-255',
+            'name'      => '属性组合规则',
+            'default'   => '',
+            'desc'      => '属性组合规则',
+            'match'     => 'is_string',
+            'update'    => 'textarea',
+            //'list'      => true,
+        ),
+
         'price'      => array
         (
             'type'      => 'varchar-50',