Browse Source

增加商品类型描述信息

stanley-king 8 years ago
parent
commit
48f861e164
1 changed files with 12 additions and 0 deletions
  1. 12 0
      helper/order_helper.php

+ 12 - 0
helper/order_helper.php

@@ -717,6 +717,8 @@ class order_helper
             $goods["store_id"] = intval($val["store_id"]);
             $goods["buyer_id"] = intval($val["buyer_id"]);
             $goods["goods_type"] = intval($val["goods_type"]);
+            $goods["type_desc"] = $this->type_desc($goods["goods_type"]);
+
             $goods["promotions_id"] = intval($val["promotions_id"]);
             $goods["gc_id"] = intval($val["gc_id"]);
             $goods["goods_spec"] = $val["goods_spec"] == null ? "" : $val["goods_spec"];
@@ -731,6 +733,16 @@ class order_helper
         return $result;
     }
 
+    private function type_desc($goods_type)
+    {
+        $descs = array(1 => "普通商品",2 => "抢购", 3 => "限购", 4 => "套装", 5 => "赠品");
+        if($goods_type > 0 && $goods_type <= count($descs)) {
+            return $descs[$goods_type];
+        } else {
+            return "";
+        }
+    }
+
     private function reciver_info($order)
     {
         $info = $order['reciver_info'];