Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
YOHOBUYPC
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
2
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
Rock Zhang
9 years ago
Commit
070e02fab2131bca0d1dad255572362a1afd6227
1 parent
ce44a166
移动购物车的目录结构
Code Review By Rock Zhang
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
34 additions
and
3 deletions
framework
yohobuy/m.yohobuy.com/application/models/Index/Cart.php
yohobuy/m.yohobuy.com/application/modules/Cart/controllers/Index.php
framework
@
e9d066dd
Subproject commit
75bbc3b075de19f239532f60c5995d06c5f814e2
Subproject commit
e9d066dd88a8e7e37103021c427a205a5cfcdcec
...
...
yohobuy/m.yohobuy.com/application/models/Index/Cart.php
View file @
070e02f
...
...
@@ -482,9 +482,16 @@ class CartModel
// 订单数据
if
(
isset
(
$payReturn
[
'shopping_cart_data'
])
&&
!
empty
(
$payReturn
[
'shopping_cart_data'
]))
{
$sumPrice
=
isset
(
$orderCompute
[
'order_amount'
])
?
$orderCompute
[
'order_amount'
]
:
$payReturn
[
'shopping_cart_data'
][
'order_amount'
];
$freight
=
isset
(
$orderCompute
[
'promotion_formula_list'
][
'promotion_amount'
])
?
$orderCompute
[
'promotion_formula_list'
][
1
][
'promotion_amount'
]
:
$payReturn
[
'shopping_cart_data'
][
'promotion_formula_list'
][
1
][
'promotion_amount'
];
$freight
=
'¥0'
;
if
(
isset
(
$orderCompute
[
'promotion_formula_list'
][
1
][
'promotion_amount'
]))
{
$freight
=
$orderCompute
[
'promotion_formula_list'
][
1
][
'promotion_amount'
];
}
elseif
(
isset
(
$payReturn
[
'shopping_cart_data'
][
'promotion_formula_list'
][
1
][
'promotion_amount'
]))
{
$freight
=
$payReturn
[
'shopping_cart_data'
][
'promotion_formula_list'
][
1
][
'promotion_amount'
];
}
$couponPrice
=
isset
(
$orderCompute
[
'coupon_amount'
])
?
$orderCompute
[
'coupon_amount'
]
:
false
;
$salePrice
=
isset
(
$orderCompute
[
'discount_amount'
])
?
$orderCompute
[
'discount_amount'
]
:
$payReturn
[
'shopping_cart_data'
][
'
promotion_formula_list'
][
3
][
'promotion
_amount'
];
$salePrice
=
isset
(
$orderCompute
[
'discount_amount'
])
?
$orderCompute
[
'discount_amount'
]
:
$payReturn
[
'shopping_cart_data'
][
'
discount
_amount'
];
$price
=
isset
(
$orderCompute
[
'last_order_amount'
])
?
$orderCompute
[
'last_order_amount'
]
:
$payReturn
[
'shopping_cart_data'
][
'last_order_amount'
];
$result
[
'sumPrice'
]
=
Helpers
::
transPrice
(
$sumPrice
);
$result
[
'salePrice'
]
=
Helpers
::
transPrice
(
$salePrice
);
...
...
yohobuy/m.yohobuy.com/application/modules/Cart/controllers/Index.php
View file @
070e02f
...
...
@@ -211,6 +211,30 @@ class IndexController extends AbstractAction
}
/**
* 修改购物车商品数量
*/
public
function
modifyNumAction
()
{
$result
=
array
();
if
(
$this
->
isAjax
())
{
$shoppingKey
=
$this
->
getSession
(
'shoppingKey'
);
$uid
=
$this
->
getUid
(
true
);
$sku
=
$this
->
post
(
'sku'
,
0
);
$increaseNum
=
$this
->
post
(
'increaseNum'
,
null
);
$decreaseNum
=
$this
->
post
(
'decreaseNum'
,
null
);
$result
=
CartModel
::
modifyProductNum
(
$uid
,
$sku
,
$increaseNum
,
$decreaseNum
,
$shoppingKey
);
}
if
(
empty
(
$result
))
{
echo
' '
;
}
else
{
$this
->
echoJson
(
$result
);
}
}
/**
* 修改购物车商品数据
*/
public
function
modifyAction
()
...
...
Please
register
or
login
to post a comment