下单页切换收货地址国家城市时,没有自动计算对应国家城市默认选中快递费用

bug问题 · chenchaojie · 于 6年前 发布 · 1959 次阅读

当时效果我忘记截图了,如果没有修复可重现

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;
        }
    }
共收到 4 条回复
Fecmall#16年前 0 个赞

切换国家的时候,城市不会默认选中,可以参看demo:hop.appfront.fancyecommerce.com/

你先对照下代码:https://github.com/fecshop/yii2_fecshop/blob/master/app/appfront/modules/Checkout/block/onepage/Index.php

你先自己确定下问题,在最新的demo中是否存在问题,比对下github的代码。

然后在决定是否发帖,多谢您今天的反馈!

Fecmall#26年前 0 个赞

除了您的这个问题,还在确认中,其他的问题已经修复,代码:

https://github.com/fecshop/yii2_fecshop/commits/master

您看一下demo,确认一下这个帖子的问题,是否存在您说的问题,如果有问题,详细回复一下。

chenchaojie#36年前 0 个赞

fancyecommerce/fecshop 1.4.0.1 fancyecommerce yii2 fecshop 这个版本下是存在的

Fecmall#46年前 0 个赞

@chenchaojie [#3楼](#comment3) 说清楚一点,到底是存在问题,还是代码存在?

请!一次性把问题说清楚!!!!把描述的概念和语句加上上下文!

添加回复 (需要登录)
需要 登录 后方可回复, 如果你还没有账号请点击这里 注册
Your Site Analytics