Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenDocCN
yii2_fecshop
提交
d6d18eb6
Y
yii2_fecshop
项目概览
OpenDocCN
/
yii2_fecshop
通知
17
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
Y
yii2_fecshop
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
d6d18eb6
编写于
2月 02, 2018
作者:
T
Terry
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
将apphtml5,appserver端,重量计算更新,和appfront一样,订单重量 = max(产品实际重量,产品体积重量)
上级
6e893ecc
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
24 addition
and
8 deletion
+24
-8
app/apphtml5/modules/Checkout/block/onepage/Index.php
app/apphtml5/modules/Checkout/block/onepage/Index.php
+4
-2
app/apphtml5/modules/Checkout/controllers/CartController.php
app/apphtml5/modules/Checkout/controllers/CartController.php
+5
-1
app/apphtml5/modules/Payment/block/paypal/express/Review.php
app/apphtml5/modules/Payment/block/paypal/express/Review.php
+3
-1
app/appserver/modules/Checkout/block/onepage/Index.php
app/appserver/modules/Checkout/block/onepage/Index.php
+4
-2
app/appserver/modules/Checkout/controllers/CartController.php
...appserver/modules/Checkout/controllers/CartController.php
+5
-1
app/appserver/modules/Payment/block/paypal/express/Review.php
...appserver/modules/Payment/block/paypal/express/Review.php
+3
-1
未找到文件。
app/apphtml5/modules/Checkout/block/onepage/Index.php
浏览文件 @
d6d18eb6
...
...
@@ -352,13 +352,15 @@ class Index
$cartProductInfo
=
Yii
::
$service
->
cart
->
quoteItem
->
getCartProductInfo
();
//echo $country ;
$product_weight
=
$cartProductInfo
[
'product_weight'
];
$product_volume_weight
=
$cartProductInfo
[
'product_volume_weight'
];
$product_final_weight
=
max
(
$product_weight
,
$product_volume_weight
);
$cartShippingMethod
=
$this
->
_cart_info
[
'shipping_method'
];
//echo "$custom_shipping_method,$cartShippingMethod";
$current_shipping_method
=
Yii
::
$service
->
shipping
->
getCurrentShippingMethod
(
$custom_shipping_method
,
$cartShippingMethod
,
$country
,
$region
,
$product_weight
);
$current_shipping_method
=
Yii
::
$service
->
shipping
->
getCurrentShippingMethod
(
$custom_shipping_method
,
$cartShippingMethod
,
$country
,
$region
,
$product_
final_
weight
);
$this
->
_shipping_method
=
$current_shipping_method
;
// 得到所有,有效的shipping method
$shippingArr
=
$this
->
getShippingArr
(
$product_weight
,
$current_shipping_method
,
$country
,
$region
);
$shippingArr
=
$this
->
getShippingArr
(
$product_
final_
weight
,
$current_shipping_method
,
$country
,
$region
);
return
$shippingArr
;
}
...
...
app/apphtml5/modules/Checkout/controllers/CartController.php
浏览文件 @
d6d18eb6
...
...
@@ -162,7 +162,11 @@ class CartController extends AppfrontController
}
$error_arr
=
Yii
::
$service
->
helper
->
errors
->
get
(
true
);
if
(
!
empty
(
$error_arr
))
{
$error_str
=
implode
(
','
,
$error_arr
);
if
(
is_array
(
$error_arr
))
{
$error_str
=
implode
(
','
,
$error_arr
);
}
else
{
$error_str
=
$error_arr
;
}
echo
json_encode
([
'status'
=>
'fail'
,
'content'
=>
$error_str
,
...
...
app/apphtml5/modules/Payment/block/paypal/express/Review.php
浏览文件 @
d6d18eb6
...
...
@@ -304,6 +304,8 @@ class Review
$cartProductInfo
=
Yii
::
$service
->
cart
->
quoteItem
->
getCartProductInfo
();
//echo $country ;
$product_weight
=
$cartProductInfo
[
'product_weight'
];
$product_volume_weight
=
$cartProductInfo
[
'product_volume_weight'
];
$product_final_weight
=
max
(
$product_weight
,
$product_volume_weight
);
// 传递当前的货运方式,这个需要从cart中选取,
// 如果cart中没有shipping_method,那么该值为空
//var_dump($this->_cart_info);
...
...
@@ -312,7 +314,7 @@ class Review
$current_shipping_method
=
Yii
::
$service
->
shipping
->
getCurrentShippingMethod
(
$custom_shipping_method
,
$cartShippingMethod
);
$this
->
_shipping_method
=
$current_shipping_method
;
$shippingArr
=
$this
->
getShippingArr
(
$product_weight
,
$current_shipping_method
,
$country
,
$region
);
$shippingArr
=
$this
->
getShippingArr
(
$product_
final_
weight
,
$current_shipping_method
,
$country
,
$region
);
return
$shippingArr
;
}
...
...
app/appserver/modules/Checkout/block/onepage/Index.php
浏览文件 @
d6d18eb6
...
...
@@ -381,12 +381,14 @@ class Index
}
$cartProductInfo
=
Yii
::
$service
->
cart
->
quoteItem
->
getCartProductInfo
();
$product_weight
=
$cartProductInfo
[
'product_weight'
];
$product_volume_weight
=
$cartProductInfo
[
'product_volume_weight'
];
$product_final_weight
=
max
(
$product_weight
,
$product_volume_weight
);
$cartShippingMethod
=
$this
->
_cart_info
[
'shipping_method'
];
// 当前的货运方式
$current_shipping_method
=
Yii
::
$service
->
shipping
->
getCurrentShippingMethod
(
$custom_shipping_method
,
$cartShippingMethod
,
$country
,
$region
,
$product_weight
);
$current_shipping_method
=
Yii
::
$service
->
shipping
->
getCurrentShippingMethod
(
$custom_shipping_method
,
$cartShippingMethod
,
$country
,
$region
,
$product_
final_
weight
);
$this
->
_shipping_method
=
$current_shipping_method
;
// 得到所有,有效的shipping method
$shippingArr
=
$this
->
getShippingArr
(
$product_weight
,
$current_shipping_method
,
$country
,
$region
=
'*'
);
$shippingArr
=
$this
->
getShippingArr
(
$product_
final_
weight
,
$current_shipping_method
,
$country
,
$region
=
'*'
);
return
$shippingArr
;
}
...
...
app/appserver/modules/Checkout/controllers/CartController.php
浏览文件 @
d6d18eb6
...
...
@@ -280,7 +280,11 @@ class CartController extends AppserverController
}
$error_arr
=
Yii
::
$service
->
helper
->
errors
->
get
(
true
);
if
(
!
empty
(
$error_arr
))
{
$error_str
=
implode
(
','
,
$error_arr
);
if
(
is_array
(
$error_arr
))
{
$error_str
=
implode
(
','
,
$error_arr
);
}
else
{
$error_str
=
$error_arr
;
}
$innerTransaction
->
rollBack
();
$code
=
Yii
::
$service
->
helper
->
appserver
->
cart_coupon_invalid
;
$data
=
[
...
...
app/appserver/modules/Payment/block/paypal/express/Review.php
浏览文件 @
d6d18eb6
...
...
@@ -327,6 +327,8 @@ class Review
$cartProductInfo
=
Yii
::
$service
->
cart
->
quoteItem
->
getCartProductInfo
();
//echo $country ;
$product_weight
=
$cartProductInfo
[
'product_weight'
];
$product_volume_weight
=
$cartProductInfo
[
'product_volume_weight'
];
$product_final_weight
=
max
(
$product_weight
,
$product_volume_weight
);
// 传递当前的货运方式,这个需要从cart中选取,
// 如果cart中没有shipping_method,那么该值为空
//var_dump($this->_cart_info);
...
...
@@ -335,7 +337,7 @@ class Review
$current_shipping_method
=
Yii
::
$service
->
shipping
->
getCurrentShippingMethod
(
$custom_shipping_method
,
$cartShippingMethod
);
$this
->
_shipping_method
=
$current_shipping_method
;
$shippingArr
=
$this
->
getShippingArr
(
$product_weight
,
$current_shipping_method
,
$country
,
$region
);
$shippingArr
=
$this
->
getShippingArr
(
$product_
final_
weight
,
$current_shipping_method
,
$country
,
$region
);
return
$shippingArr
;
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录