Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
YOHO-ACTIVITY-PHP
·
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
2015-12-17 13:35:32 +0800
Commit
0adcaadf633c6edac413ecf67cd3bec7c6c58797
1 parent
827570a6
添加购物车未登录用户的登陆链接地址,修复未登录用户添加商品时设置shopping_key错误的bug
Code Review By Rock Zhang
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
3 deletions
template/m.yohobuy.com/actions/cart/index/index.phtml
yohobuy/m.yohobuy.com/application/models/Index/Cart.php
yohobuy/m.yohobuy.com/application/modules/Cart/controllers/Index.php
template/m.yohobuy.com/actions/cart/index/index.phtml
View file @
0adcaad
...
...
@@ -31,7 +31,7 @@
<p
class=
"login-info"
>
<span
class=
"iconfont"
>
628
;</span>
请您先
<a
class=
"btn btn-login"
>登录</a>
<a
class=
"btn btn-login"
href=
"{{signurl}}"
>登录</a>
可以同步电脑和手机中的商品
</p>
{
{/if
}
}
...
...
yohobuy/m.yohobuy.com/application/models/Index/Cart.php
View file @
0adcaad
...
...
@@ -54,6 +54,7 @@ class CartModel
// 用户是否登录
if
(
empty
(
$uid
))
{
$result
[
'signurl'
]
=
Helpers
::
url
(
'/signin.html'
,
array
(
'refer'
=>
Helpers
::
url
(
'/cart/index/index'
)));
$result
[
'showLoginInfo'
]
=
true
;
}
...
...
@@ -63,7 +64,7 @@ class CartModel
// 处理普通购物车和预售购物车的数据
do
{
if
(
!
isset
(
$cartData
[
'data'
])
||
empty
(
$cartData
[
'data'
]))
{
$result
[
'isEmptyCart'
]
=
true
;
//
$result['isEmptyCart'] = true;
break
;
}
...
...
yohobuy/m.yohobuy.com/application/modules/Cart/controllers/Index.php
View file @
0adcaad
...
...
@@ -464,7 +464,7 @@ class IndexController extends AbstractAction
// 设置加入购物车凭证到客户端浏览器
if
(
isset
(
$result
[
'data'
][
'shopping_key'
]))
{
$this
->
setCookie
(
'_spk'
,
$
shoppingKey
);
$this
->
setCookie
(
'_spk'
,
$
result
[
'data'
][
'shopping_key'
]
);
}
}
...
...
Please
register
or
login
to post a comment