Bläddra i källkod

运费险修改固定金额以美元为准

llp 1 vecka sedan
förälder
incheckning
8912a45116

+ 2 - 1
packages/Longyi/ShippingInsurance/src/Listeners/ShippingInsuranceHandler.php

@@ -59,7 +59,8 @@ class ShippingInsuranceHandler
         if ($type === 'percentage') {
             $insuranceAmount = round($cart->sub_total * ($value / 100), 2);
         } else {
-            $insuranceAmount = $value;
+            // Fixed amount is defined in USD (base currency), convert to current currency
+            $insuranceAmount = round((float) core()->convertPrice($value), 2);
         }
 
         // Convert to base currency for base fields