Toggle navigation
Toggle navigation
This project
Loading...
Sign in
chenchao
/
YOHOBUYPC
·
Commits
Go to a project
GitLab
Go to dashboard
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
bd75f1584ec524bc4e1464e6ac4f38c75ff803b4
1 parent
0b7ce274
修复预售购物车不显示下架商品的bug
Code Review By Rock Zhang
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
1 deletions
template/m.yohobuy.com/partials/cart/cart-content.phtml
yohobuy/m.yohobuy.com/application/models/Index/Cart.php
template/m.yohobuy.com/partials/cart/cart-content.phtml
View file @
bd75f15
...
...
@@ -12,6 +12,14 @@
</div>
{{/if}}
{{#if offShelveGoods}}
<div class="invalid-goods">
{{# offShelveGoods}}
{{> cart/good}}
{{/ offShelveGoods}}
</div>
{{/if}}
{{#if freebieOrAdvanceBuy}}
<ul class="freebie-and-advance-buy">
{{#if freebie}}
...
...
yohobuy/m.yohobuy.com/application/models/Index/Cart.php
View file @
bd75f15
...
...
@@ -773,7 +773,7 @@ class CartModel
do
{
// 数据为空时返回空的标志
if
(
empty
(
$data
[
'goods_list'
])
&&
empty
(
$data
[
'sold_out_goods_list'
]))
{
if
(
empty
(
$data
[
'goods_list'
])
&&
empty
(
$data
[
'sold_out_goods_list'
])
&&
empty
(
$data
[
'off_shelves_goods_list'
])
)
{
break
;
}
...
...
@@ -800,6 +800,12 @@ class CartModel
$result
[
'notValidGoods'
]
=
$notValidGoods
;
}
// 下架的商品列表
$offShelveGoods
=
Helpers
::
formatCartGoods
(
$data
[
'off_shelves_goods_list'
],
$isAdvanceCart
,
false
);
if
(
!
empty
(
$offShelveGoods
))
{
$result
[
'offShelveGoods'
]
=
$offShelveGoods
;
}
// 赠品和加价购商品
if
(
count
(
$data
[
'gift_list'
])
||
count
(
$data
[
'price_gift'
]))
{
$result
[
'freebieOrAdvanceBuy'
]
=
true
;
...
...
Please
register
or
login
to post a comment