Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
YOHOBUYWAP
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
0
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
a9110184ad567e23de9baa0446d751eeabcf622f
1 parent
137cb131
修复各种购物车结算页面当商品为空时的处理逻辑
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
2 deletions
yohobuy/m.yohobuy.com/application/modules/Cart/controllers/Index.php
yohobuy/m.yohobuy.com/application/modules/Cart/controllers/Index.php
View file @
a911018
...
...
@@ -275,14 +275,20 @@ class IndexController extends AbstractAction
$this
->
setNavHeader
(
'确认订单'
,
Helpers
::
url
(
'/cart/index/index'
),
false
);
// 不显示右上角home按钮
// 购物车商品为空跳转到购物车页面
$cartType
=
$this
->
get
(
'cartType'
,
'ordinary'
);
$cartKey
=
'commonCart'
;
if
(
$cartType
===
'advance'
)
{
$cartKey
=
'preSellCart'
;
}
$shoppingKey
=
Helpers
::
getShoppingKeyByCookie
();
$uid
=
$this
->
getUid
(
true
);
$cartGoods
=
CartModel
::
getCartData
(
$uid
,
$shoppingKey
);
if
(
empty
(
$cartGoods
)
||
isset
(
$cartGoods
[
'isEmptyCart'
]))
{
if
(
isset
(
$cartGoods
[
'isEmptyCart'
])
||
empty
(
$cartGoods
[
$cartKey
]))
{
$this
->
go
(
Helpers
::
url
(
'/cart/index/index'
));
}
$cartType
=
$this
->
get
(
'cartType'
,
'ordinary'
);
$cookieData
=
$this
->
getCookie
(
'order-info'
,
null
);
$uid
=
$this
->
getUid
(
true
);
$data
=
array
(
...
...
Please
register
or
login
to post a comment