Browse Source

商城,没有运费

lizhen_gitee 2 months ago
parent
commit
37c015bc49

+ 0 - 1
addons/unishop/controller/Order.php

@@ -170,7 +170,6 @@ class Order extends Base
                 $product['market_price'] = round($product['market_price'], 2);
 
                 $order_price = bcadd($order_price,$product['total_price'],2);
-                $delivery_price = bcadd($delivery_price,$product['yunfei_price'],2);
             }
 
             $this->success('', [

+ 0 - 3
addons/unishop/model/Order.php

@@ -241,9 +241,6 @@ class Order extends Model
         // 运费
 //        $deliveryPrice = Delivery::algorithm($delivery, array_sum($numbers));
         $deliveryPrice = '0';
-        foreach ($products as $product) {
-            $deliveryPrice = bcadd($deliveryPrice,$product['yunfei_price'],2);
-        }
 
         // 总费用
         $totalPrice = bcadd(bcsub($orderPrice, $discountPrice, 2), $deliveryPrice, 2);

+ 0 - 1
addons/unishop/model/Product.php

@@ -175,7 +175,6 @@ class Product extends Model
         $data['number'] = $number;
         $data['id'] = Hashids::encodeHex($product['id']);
 
-        $data['yunfei_price'] = $product['yunfei_price'];
         $data['total_price'] = bcmul($data['sales_price'],$number,2);
 
         return $data;

+ 0 - 1
application/admin/lang/zh-cn/unishop/product.php

@@ -8,7 +8,6 @@ return [
     'Image'          => '主图',
     'Images'         => '组图',
     'Video_file'         => '视频',
-    'Yunfei_price'         => '运费',
     'Desc'           => '详情',
     'Sales'          => '虚拟销售量',
     'Stock'          => '库存',

+ 0 - 6
application/admin/view/unishop/product/add.html

@@ -94,12 +94,6 @@
 
     </div>
 
-    <div class="form-group">
-        <label class="control-label col-xs-12 col-sm-2">{:__('Yunfei_price')}:</label>
-        <div class="col-xs-12 col-sm-8">
-            <input id="c-yunfei_price" data-rule="required" min="0" class="form-control" name="row[yunfei_price]" type="number" value="0">
-        </div>
-    </div>
 
     <div class="form-group">
         <label class="control-label col-xs-12 col-sm-2">{:__('Desc')}:</label>

+ 0 - 6
application/admin/view/unishop/product/edit.html

@@ -94,12 +94,6 @@
 
     </div>
 
-    <div class="form-group">
-        <label class="control-label col-xs-12 col-sm-2">{:__('Yunfei_price')}:</label>
-        <div class="col-xs-12 col-sm-8">
-            <input id="c-yunfei_price" data-rule="required" min="0" class="form-control" name="row[yunfei_price]" type="number" value="{$row.yunfei_price}">
-        </div>
-    </div>
 
     <div class="form-group">
         <label class="control-label col-xs-12 col-sm-2">{:__('Desc')}:</label>