From a92fa87940084962d7187f5d88881c4b104005b5 Mon Sep 17 00:00:00 2001 From: Terry <2358269014@qq.com> Date: Sat, 14 Aug 2021 10:29:59 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=AF=E4=BB=98=E9=83=A8=E5=88=86=E7=9A=84?= =?UTF-8?q?=E4=B8=80=E4=BA=9B=E9=97=AE=E9=A2=98=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/Payment/block/paypal/express/Review.php | 11 +++++++++-- .../base/front/payment/paypal/express/review.php | 7 +++++-- .../modules/Payment/block/paypal/express/Review.php | 11 +++++++++-- .../base/html5/payment/paypal/express/review.php | 7 +++++-- 4 files changed, 28 insertions(+), 8 deletions(-) diff --git a/app/appfront/modules/Payment/block/paypal/express/Review.php b/app/appfront/modules/Payment/block/paypal/express/Review.php index 3673fcefd..49368658f 100644 --- a/app/appfront/modules/Payment/block/paypal/express/Review.php +++ b/app/appfront/modules/Payment/block/paypal/express/Review.php @@ -221,10 +221,10 @@ public function ajaxChangecountry() * 本函数为从数据库中得到购物车中的数据,然后结合产品表 * 在加入一些产品数据,最终补全所有需要的信息。 */ - public function getCartInfo($shipping_method, $country, $state) + public function getCartInfo($activeProduct, $shipping_method, $country, $state) { if (!$this->_cart_info) { - $cart_info = Yii::$service->cart->getCartInfo(true, $shipping_method, $country, $state); + $cart_info = Yii::$service->cart->getCartInfo($activeProduct, $shipping_method, $country, $state); if (isset($cart_info['products']) && is_array($cart_info['products'])) { foreach ($cart_info['products'] as $k=>$product_one) { // 设置名字,得到当前store的语言名字。 @@ -436,6 +436,13 @@ public function setValue($getExpressCheckoutReturn) } if ($getExpressCheckoutReturn['SHIPTOCOUNTRYCODE']) { $this->_address['country'] = $getExpressCheckoutReturn['SHIPTOCOUNTRYCODE']; + if ($this->_address['country'] == 'C2') { + $this->_address['country'] = 'CN'; + } + $this->_country = $this->_address['country']; + if ($this->_address['country']) { + $this->_address['country_name'] = Yii::$service->helper->country->getCountryNameByKey($this->_address['country']); + } } if ($getExpressCheckoutReturn['SHIPTOSTATE']) { $this->_address['state'] = $getExpressCheckoutReturn['SHIPTOSTATE']; diff --git a/app/appfront/theme/base/front/payment/paypal/express/review.php b/app/appfront/theme/base/front/payment/paypal/express/review.php index 320a8cacc..13199d748 100644 --- a/app/appfront/theme/base/front/payment/paypal/express/review.php +++ b/app/appfront/theme/base/front/payment/paypal/express/review.php @@ -84,6 +84,8 @@