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
d328d26dc57276beff0382b71ff296b3c7f7c03e
1 parent
32028828
修复限购商品结算的连接跳转问题
Code Review By Rock Zhang
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
8 deletions
yohobuy/m.yohobuy.com/application/models/Index/Cart.php
yohobuy/m.yohobuy.com/application/modules/Cart/controllers/Index.php
yohobuy/m.yohobuy.com/application/models/Index/Cart.php
View file @
d328d26
...
...
@@ -331,10 +331,9 @@ class CartModel
$result
=
array
();
$skuList
=
''
;
$hasSkuListCookie
=
isset
(
$orderInfo
[
'skuList'
]);
$isLimitGoods
=
$hasSkuListCookie
||
(
!
empty
(
$sku
)
&&
!
empty
(
$skn
)
&&
!
empty
(
$buyNumber
));
if
(
$isLimitGoods
)
{
// 存在sku,skn和buyNumber或者cookie中有skuList时为限购商品
$skuList
=
$hasSkuListCookie
?
$orderInfo
[
'skuList'
]
:
json_encode
(
array
(
$isLimitGoods
=
!
empty
(
$sku
)
&&
!
empty
(
$skn
)
&&
!
empty
(
$buyNumber
);
if
(
$isLimitGoods
)
{
// 存在sku,skn和buyNumber时为限购商品
$skuList
=
json_encode
(
array
(
array
(
'type'
=>
'limitcode'
,
'limitproductcode'
=>
$limitProductCode
,
...
...
@@ -343,8 +342,6 @@ class CartModel
'buy_number'
=>
$buyNumber
)
));
$result
[
'skn'
]
=
$skn
;
$result
[
'isLimit'
]
=
true
;
}
...
...
yohobuy/m.yohobuy.com/application/modules/Cart/controllers/Index.php
View file @
d328d26
...
...
@@ -321,7 +321,7 @@ class IndexController extends AbstractAction
// 限购商品时更换返回按钮地址
if
(
isset
(
$order
[
'isLimit'
]))
{
$returnUrl
=
Helpers
::
url
(
'/product/show_'
.
$
order
[
'skn'
]
.
'.html'
);
;
$returnUrl
=
Helpers
::
url
(
'/product/show_'
.
$
skn
.
'.html'
)
;
}
$data
=
array
(
...
...
@@ -400,9 +400,20 @@ class IndexController extends AbstractAction
// 审判跳转登录页
$this
->
auditJumpLogin
();
// 获取cookie中的信息
$cookieData
=
$this
->
getCookie
(
'order-info'
,
null
);
$orderInfo
=
array
();
if
(
!
empty
(
$cookieData
))
{
$orderInfo
=
json_decode
(
$cookieData
,
true
);
}
$returnUrl
=
Helpers
::
url
(
'/cart/index/orderEnsure'
);
if
(
isset
(
$orderInfo
[
'limitUrlSufix'
]))
{
$returnUrl
.=
$orderInfo
[
'limitUrlSufix'
];
}
// 设置网站标题
$this
->
setTitle
(
'选择地址'
);
$this
->
setNavHeader
(
'选择地址'
,
Helpers
::
url
(
'/cart/index/orderEnsure'
)
,
false
);
$this
->
setNavHeader
(
'选择地址'
,
$returnUrl
,
false
);
$uid
=
$this
->
getUid
(
true
);
$address
=
UserModel
::
getAddressData
(
$uid
);
...
...
Please
register
or
login
to post a comment