dever 3 years ago
parent
commit
b32643af39
1 changed files with 10 additions and 0 deletions
  1. 10 0
      app/goods/lib/Manage.php

+ 10 - 0
app/goods/lib/Manage.php

@@ -177,6 +177,16 @@ class Manage
                     }
                 }
                 $table['套餐商品'] = implode(',', $table['套餐商品']);
+            } elseif ($info['price_type'] == 4) {
+                # 获取套餐的商品
+                $goods = Dever::array_decode($info['goods']);
+                foreach ($goods as $k => $v) {
+                    $goods_info = Dever::db('goods/info')->one($v['goods_id']);
+                    if ($goods_info) {
+                        $table['组合商品'][] = $v['num'] . '个' . $goods_info['name'];
+                    }
+                }
+                $table['组合商品'] = implode(',', $table['组合商品']);
             }
 
             $attr = $this->attrInfo($info);