Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenDocCN
yii2_fecshop
提交
417c51f6
Y
yii2_fecshop
项目概览
OpenDocCN
/
yii2_fecshop
通知
18
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,发现更多精彩内容 >>
提交
417c51f6
编写于
12月 11, 2017
作者:
T
Terry
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
订单备注完善
上级
eea16dd3
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
74 addition
and
18 deletion
+74
-18
app/appfront/modules/Payment/block/paypal/express/Placeorder.php
...front/modules/Payment/block/paypal/express/Placeorder.php
+19
-3
app/appfront/theme/base/front/payment/paypal/express/review.php
...pfront/theme/base/front/payment/paypal/express/review.php
+5
-0
app/apphtml5/modules/Payment/block/paypal/express/Placeorder.php
...html5/modules/Payment/block/paypal/express/Placeorder.php
+19
-3
app/apphtml5/theme/base/html5/checkout/onepage/index/review_order.php
.../theme/base/html5/checkout/onepage/index/review_order.php
+4
-4
app/apphtml5/theme/base/html5/payment/paypal/express/review.php
...phtml5/theme/base/html5/payment/paypal/express/review.php
+5
-1
app/apphtml5/theme/base/html5/payment/paypal/express/review/review_order.php
...base/html5/payment/paypal/express/review/review_order.php
+4
-4
app/appserver/modules/Payment/block/paypal/express/Placeorder.php
...erver/modules/Payment/block/paypal/express/Placeorder.php
+18
-3
未找到文件。
app/appfront/modules/Payment/block/paypal/express/Placeorder.php
浏览文件 @
417c51f6
...
...
@@ -31,7 +31,10 @@ class Placeorder
* 用户的支付方式.
*/
public
$_payment_method
;
/**
* 订单备注信息.
*/
public
$_order_remark
;
public
function
getLastData
()
{
$post
=
Yii
::
$app
->
request
->
post
();
...
...
@@ -59,7 +62,7 @@ class Placeorder
// 将购物车数据,生成订单,生成订单后,不清空购物车,不扣除库存,在支付成功后在清空购物车。
$innerTransaction
=
Yii
::
$app
->
db
->
beginTransaction
();
try
{
$genarateStatus
=
Yii
::
$service
->
order
->
generateOrderByCart
(
$this
->
_billing
,
$this
->
_shipping_method
,
$this
->
_payment_method
,
false
,
$token
);
$genarateStatus
=
Yii
::
$service
->
order
->
generateOrderByCart
(
$this
->
_billing
,
$this
->
_shipping_method
,
$this
->
_payment_method
,
false
,
$token
,
$this
->
_order_remark
);
if
(
$genarateStatus
)
{
$innerTransaction
->
commit
();
}
else
{
...
...
@@ -223,7 +226,20 @@ class Placeorder
return
false
;
}
}
// 订单备注信息不能超过1500字符
$orderRemarkStrMaxLen
=
Yii
::
$service
->
order
->
orderRemarkStrMaxLen
;
$order_remark
=
isset
(
$post
[
'order_remark'
])
?
$post
[
'order_remark'
]
:
''
;
if
(
$order_remark
&&
$orderRemarkStrMaxLen
)
{
$order_remark_strlen
=
strlen
(
$order_remark
);
if
(
$order_remark_strlen
>
$orderRemarkStrMaxLen
)
{
Yii
::
$service
->
helper
->
errors
->
add
(
'order remark string length can not gt '
.
$orderRemarkStrMaxLen
);
return
false
;
}
else
{
// 去掉xss攻击字符,关于防止xss攻击的yii文档参看:http://www.yiichina.com/doc/guide/2.0/security-best-practices#fang-zhi-xss-gong-ji
$this
->
_order_remark
=
$order_remark
;
}
}
$this
->
_shipping_method
=
$shipping_method
;
$this
->
_payment_method
=
$payment_method
;
Yii
::
$service
->
payment
->
setPaymentMethod
(
$this
->
_payment_method
);
...
...
app/appfront/theme/base/front/payment/paypal/express/review.php
浏览文件 @
417c51f6
...
...
@@ -66,6 +66,11 @@
<div
class=
"coupon_add_log"
></div>
</div>
<div
class=
"onestepcheckout-coupons"
>
<div
class=
"op_block_title"
>
<?=
Yii
::
$service
->
page
->
translate
->
__
(
'Order Remark (optional)'
);
?>
</div>
<label
for=
"id_couponcode"
>
<?=
Yii
::
$service
->
page
->
translate
->
__
(
'You can fill in the order remark information below'
);
?>
</label>
<textarea
class=
"order_remark"
name=
"order_remark"
style=
"width:94%;height:100px;padding:10px;"
></textarea>
</div>
</div>
...
...
app/apphtml5/modules/Payment/block/paypal/express/Placeorder.php
浏览文件 @
417c51f6
...
...
@@ -31,7 +31,10 @@ class Placeorder
* 用户的支付方式.
*/
public
$_payment_method
;
/**
* 订单备注信息.
*/
public
$_order_remark
;
public
function
getLastData
()
{
$post
=
Yii
::
$app
->
request
->
post
();
...
...
@@ -59,7 +62,7 @@ class Placeorder
// 将购物车数据,生成订单,生成订单后,不清空购物车,不扣除库存,在支付成功后在清空购物车。
$innerTransaction
=
Yii
::
$app
->
db
->
beginTransaction
();
try
{
$genarateStatus
=
Yii
::
$service
->
order
->
generateOrderByCart
(
$this
->
_billing
,
$this
->
_shipping_method
,
$this
->
_payment_method
,
false
,
$token
);
$genarateStatus
=
Yii
::
$service
->
order
->
generateOrderByCart
(
$this
->
_billing
,
$this
->
_shipping_method
,
$this
->
_payment_method
,
false
,
$token
,
$this
->
_order_remark
);
if
(
$genarateStatus
)
{
$innerTransaction
->
commit
();
}
else
{
...
...
@@ -223,7 +226,20 @@ class Placeorder
return
false
;
}
}
// 订单备注信息不能超过1500字符
$orderRemarkStrMaxLen
=
Yii
::
$service
->
order
->
orderRemarkStrMaxLen
;
$order_remark
=
isset
(
$post
[
'order_remark'
])
?
$post
[
'order_remark'
]
:
''
;
if
(
$order_remark
&&
$orderRemarkStrMaxLen
)
{
$order_remark_strlen
=
strlen
(
$order_remark
);
if
(
$order_remark_strlen
>
$orderRemarkStrMaxLen
)
{
Yii
::
$service
->
helper
->
errors
->
add
(
'order remark string length can not gt '
.
$orderRemarkStrMaxLen
);
return
false
;
}
else
{
// 去掉xss攻击字符,关于防止xss攻击的yii文档参看:http://www.yiichina.com/doc/guide/2.0/security-best-practices#fang-zhi-xss-gong-ji
$this
->
_order_remark
=
$order_remark
;
}
}
$this
->
_shipping_method
=
$shipping_method
;
$this
->
_payment_method
=
$payment_method
;
Yii
::
$service
->
payment
->
setPaymentMethod
(
$this
->
_payment_method
);
...
...
app/apphtml5/theme/base/html5/checkout/onepage/index/review_order.php
浏览文件 @
417c51f6
...
...
@@ -60,25 +60,25 @@ use fecshop\app\apphtml5\helper\Format;
<table
class=
"onestepcheckout-totals"
>
<tbody>
<tr>
<td
>
<?=
Yii
::
$service
->
page
->
translate
->
__
(
'Subtotal'
)
?>
</td>
<td
class=
"totals"
>
<?=
Yii
::
$service
->
page
->
translate
->
__
(
'Subtotal'
)
?>
</td>
<td
class=
"value"
>
<span
class=
"price"
>
<?=
$currency_info
[
'symbol'
];
?><?=
Format
::
price
(
$cart_info
[
'product_total'
]);
?>
</span>
</td>
</tr>
<tr>
<td
>
<?=
Yii
::
$service
->
page
->
translate
->
__
(
'Shipping Cost'
)
?>
</td>
<td
class=
"totals"
>
<?=
Yii
::
$service
->
page
->
translate
->
__
(
'Shipping Cost'
)
?>
</td>
<td
class=
"value"
>
<span
class=
"price"
>
<?=
$currency_info
[
'symbol'
];
?><?=
Format
::
price
(
$cart_info
[
'shipping_cost'
]);
?>
</span>
</td>
</tr>
<tr>
<td
>
<?=
Yii
::
$service
->
page
->
translate
->
__
(
'Discount'
)
?>
</td>
<td
class=
"totals"
>
<?=
Yii
::
$service
->
page
->
translate
->
__
(
'Discount'
)
?>
</td>
<td
class=
"value"
>
<span
class=
"price"
>
-
<?=
$currency_info
[
'symbol'
];
?><?=
Format
::
price
(
$cart_info
[
'coupon_cost'
]);
?>
</span>
</td>
</tr>
<tr
class=
"grand-total"
>
<td
>
<?=
Yii
::
$service
->
page
->
translate
->
__
(
'Grand Total'
)
?>
</td>
<td
class=
"totals"
>
<?=
Yii
::
$service
->
page
->
translate
->
__
(
'Grand Total'
)
?>
</td>
<td
class=
"value"
>
<span
class=
"price"
>
<?=
$currency_info
[
'symbol'
];
?><?=
Format
::
price
(
$cart_info
[
'grand_total'
])
?>
</span>
</td>
...
...
app/apphtml5/theme/base/html5/payment/paypal/express/review.php
浏览文件 @
417c51f6
...
...
@@ -65,7 +65,11 @@
<div
class=
"coupon_add_log"
></div>
</div>
<div
class=
"onestepcheckout-coupons"
>
<div
class=
"op_block_title"
>
<?=
Yii
::
$service
->
page
->
translate
->
__
(
'Order Remark (optional)'
);
?>
</div>
<label
for=
"id_couponcode"
>
<?=
Yii
::
$service
->
page
->
translate
->
__
(
'You can fill in the order remark information below'
);
?>
</label>
<textarea
class=
"order_remark"
name=
"order_remark"
style=
"width:100%;height:100px;padding:10px;"
></textarea>
</div>
</div>
<div
class=
"onestepcheckout-column-right"
>
...
...
app/apphtml5/theme/base/html5/payment/paypal/express/review/review_order.php
浏览文件 @
417c51f6
...
...
@@ -61,25 +61,25 @@ use fecshop\app\apphtml5\helper\Format;
<table
class=
"onestepcheckout-totals"
>
<tbody>
<tr>
<td
class=
"t
itle
"
>
<?=
Yii
::
$service
->
page
->
translate
->
__
(
'Subtotal'
)
?>
</td>
<td
class=
"t
otals
"
>
<?=
Yii
::
$service
->
page
->
translate
->
__
(
'Subtotal'
)
?>
</td>
<td
class=
"value"
>
<span
class=
"price"
>
<?=
$currency_info
[
'symbol'
];
?><?=
Format
::
price
(
$cart_info
[
'product_total'
]);
?>
</span>
</td>
</tr>
<tr>
<td
class=
"t
itle
"
>
<?=
Yii
::
$service
->
page
->
translate
->
__
(
'Shipping Cost'
)
?>
</td>
<td
class=
"t
otals
"
>
<?=
Yii
::
$service
->
page
->
translate
->
__
(
'Shipping Cost'
)
?>
</td>
<td
class=
"value"
>
<span
class=
"price"
>
<?=
$currency_info
[
'symbol'
];
?><?=
Format
::
price
(
$cart_info
[
'shipping_cost'
]);
?>
</span>
</td>
</tr>
<tr>
<td
class=
"t
itle
"
>
<?=
Yii
::
$service
->
page
->
translate
->
__
(
'Discount'
)
?>
</td>
<td
class=
"t
otals
"
>
<?=
Yii
::
$service
->
page
->
translate
->
__
(
'Discount'
)
?>
</td>
<td
class=
"value"
>
<span
class=
"price"
>
-
<?=
$currency_info
[
'symbol'
];
?><?=
Format
::
price
(
$cart_info
[
'coupon_cost'
]);
?>
</span>
</td>
</tr>
<tr
class=
"grand-total"
>
<td
class=
"t
itle
"
>
<?=
Yii
::
$service
->
page
->
translate
->
__
(
'Grand Total'
)
?>
</td>
<td
class=
"t
otals
"
>
<?=
Yii
::
$service
->
page
->
translate
->
__
(
'Grand Total'
)
?>
</td>
<td
class=
"value"
>
<span
class=
"price"
>
<?=
$currency_info
[
'symbol'
];
?><?=
Format
::
price
(
$cart_info
[
'grand_total'
])
?>
</span>
</td>
...
...
app/appserver/modules/Payment/block/paypal/express/Placeorder.php
浏览文件 @
417c51f6
...
...
@@ -31,7 +31,9 @@ class Placeorder
* 用户的支付方式.
*/
public
$_payment_method
;
public
$_order_remark
;
public
function
getLastData
()
{
$post
=
Yii
::
$app
->
request
->
post
();
...
...
@@ -66,7 +68,7 @@ class Placeorder
// 将购物车数据,生成订单,生成订单后,不清空购物车,不扣除库存,在支付成功后在清空购物车。
$innerTransaction
=
Yii
::
$app
->
db
->
beginTransaction
();
try
{
$genarateStatus
=
Yii
::
$service
->
order
->
generateOrderByCart
(
$this
->
_billing
,
$this
->
_shipping_method
,
$this
->
_payment_method
,
false
,
$token
);
$genarateStatus
=
Yii
::
$service
->
order
->
generateOrderByCart
(
$this
->
_billing
,
$this
->
_shipping_method
,
$this
->
_payment_method
,
false
,
$token
,
$this
->
_order_remark
);
if
(
$genarateStatus
)
{
$innerTransaction
->
commit
();
}
else
{
...
...
@@ -266,7 +268,20 @@ class Placeorder
}
}
// 订单备注信息不能超过1500字符
$orderRemarkStrMaxLen
=
Yii
::
$service
->
order
->
orderRemarkStrMaxLen
;
$order_remark
=
isset
(
$post
[
'order_remark'
])
?
$post
[
'order_remark'
]
:
''
;
if
(
$order_remark
&&
$orderRemarkStrMaxLen
)
{
$order_remark_strlen
=
strlen
(
$order_remark
);
if
(
$order_remark_strlen
>
$orderRemarkStrMaxLen
)
{
Yii
::
$service
->
helper
->
errors
->
add
(
'order remark string length can not gt '
.
$orderRemarkStrMaxLen
);
return
false
;
}
else
{
// 去掉xss攻击字符,关于防止xss攻击的yii文档参看:http://www.yiichina.com/doc/guide/2.0/security-best-practices#fang-zhi-xss-gong-ji
$this
->
_order_remark
=
$order_remark
;
}
}
$this
->
_shipping_method
=
$shipping_method
;
$this
->
_payment_method
=
$payment_method
;
Yii
::
$service
->
payment
->
setPaymentMethod
(
$this
->
_payment_method
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录