NoteStar 5 năm trước cách đây
mục cha
commit
2f876ec822

+ 1 - 1
vendor/fancyecommerce/fecshop/services/Shipping.php

@@ -119,7 +119,7 @@ class Shipping extends Service
     protected function actionGetShippingCostByCsv($shipping_method, $shippingConfig, $weight, $country, $region)
     {
         if (!$weight) {
-            return 0;
+            $weight = 1;
         }
         // 从配置中读取出来csv表格的数组信息(处理后的)。
         $shippingArr = $shippingConfig['csv_content'];

+ 6 - 1
vendor/fancyecommerce/fecshop/services/cart/Quote.php

@@ -395,7 +395,12 @@ class Quote extends Service
             $cart_product_info = Yii::$service->cart->quoteItem->getCartProductInfo($activeProduct);
             //var_dump($cart_product_info);
             if (is_array($cart_product_info)) {
-                $product_weight = $cart_product_info['product_weight'];
+                if($cart_product_info['product_weight'] == '0'){
+                    $product_weight = 1;
+                }else{
+                    $product_weight = $cart_product_info['product_weight'];
+                }
+
                 $product_volume_weight = $cart_product_info['product_volume_weight'];
                 $product_volume = $cart_product_info['product_volume'];
                 $product_final_weight = max($product_weight, $product_volume_weight);