dever %!s(int64=3) %!d(string=hai) anos
pai
achega
139666df9e
Modificáronse 2 ficheiros con 17 adicións e 0 borrados
  1. 10 0
      app/shop/database/info.php
  2. 7 0
      app/shop/lib/Sell.php

+ 10 - 0
app/shop/database/info.php

@@ -488,6 +488,16 @@ return array
             'option'    => $act,
         ),
 
+        'ps_cash'      => array
+        (
+            'type'      => 'varchar-50',
+            'name'      => '配送费',
+            'default'   => '0',
+            'desc'      => '配送费',
+            'match'     => 'option',
+            'update'    => 'text',
+        ),
+
         'pdesc'      => array
         (
             'type'      => 'text-255',

+ 7 - 0
app/shop/lib/Sell.php

@@ -621,6 +621,11 @@ class Sell
         }
 
         $uid = $user['id'];
+
+        if ($method == 2) {
+            $order_data['ps_cash'] = $shop['ps_cash'];
+            $price += $order_data['ps_cash'];
+        }
         
         $order_data['shop_id'] = $shop['id'];
         $order_data['uid'] = $uid;
@@ -1016,6 +1021,8 @@ class Sell
                 array('用户信息', array('昵称:' . $user['username'], '联系电话:' . $info['mobile'])),
 
                 array('订单备注', $info['info']),
+
+                array('其他信息', array('优惠券满减:' . $info['coupon_cash'], '抹零:' . $info['kou_cash'], '配送费:' . $info['ps_cash'])),
             )
         );