当时效果我忘记截图了,如果没有修复可重现
vendor/fancyecommerce/fecshop/app/appfront/modules/Checkout/block/onepage/Index.php:530
//切换国家城市时前端没有传递shipping_method参数导致 $shippingInfo为空
$shippingInfo = $avaiable_method[$shipping_method];
$shippingCost = Yii::$service->shipping->getShippingCost($shipping_method, $shippingInfo, $product_weight, $country, $state);
我改动为
$shippingInfo = isset($avaiable_method[$shipping_method]) ? $avaiable_method[$shipping_method] : array_shift($avaiable_method);
$shippingCost = Yii::$service->shipping->getShippingCost($shipping_method, $shippingInfo, $product_weight, $country, $state);
vendor/fancyecommerce/fecshop/services/Shipping.php:194
protected function actionGetCurrentShippingMethod($customShippingMethod, $cartShippingMethod, $country, $region, $weight)
{
....
//与这个显示逻辑不符
// 如果都不存在,则将可用物流中的第一个取出来$available_method
foreach ($available_method as $method => $v) {
return $method;
}
}