Jelajahi Sumber

送货上门限制

shish 1 tahun lalu
induk
melakukan
f71b367b6a
1 mengubah file dengan 12 tambahan dan 1 penghapusan
  1. 12 1
      app-hd/controllers/PurchaseController.php

+ 12 - 1
app-hd/controllers/PurchaseController.php

@@ -589,8 +589,19 @@ class PurchaseController extends BaseController
                     }
                     //花悠星 国恋 勇记 万丽 陆丰暂时不支持免费配送
                     if ($ghsShopId == 7687 || $ghsShopId == 7831 || $ghsShopId == 7778 || $ghsShopId == 12003 || $ghsShopId == 38128 || $ghsShopId == 63979) {
-                        util::fail('暂不支持送货上门,请选其它配送方式');
+                        util::fail('暂不支持送货上门,请选其它配送方式');
                     }
+
+                    if(isset($ghs['home'])){
+                        if($ghs['home'] == 0){
+                            util::fail('暂不支持送货上门,请选其它配送方式');
+                        }
+                        if(isset($ghs['homeAmount']) && $ghs['homeAmount']>$respond->actPrice){
+                            $homeAmount = floatval($ghs['homeAmount']);
+                            util::fail("消费满{$homeAmount}元 可送货上门");
+                        }
+                    }
+
                 }
             }
             if ($sendType == 2) {