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
001c1d86346a600acd618819c752d3232ddea9db
1 parent
4365503d
添加购物车商品链接地址
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
9 deletions
library/Plugin/Helpers.php
template/m.yohobuy.com/partials/cart/good.phtml
library/Plugin/Helpers.php
View file @
001c1d8
...
...
@@ -576,30 +576,31 @@ class Helpers
$oneGoods
[
'thumb'
]
=
!
empty
(
$value
[
'goods_images'
])
?
Images
::
getImageUrl
(
$value
[
'goods_images'
],
90
,
100
)
:
''
;
$oneGoods
[
'color'
]
=
$value
[
'color_name'
];
$oneGoods
[
'size'
]
=
$value
[
'size_name'
];
$oneGoods
[
'
isSelect
ed'
]
=
$value
[
'selected'
]
===
'Y'
;
$oneGoods
[
'
check
ed'
]
=
$value
[
'selected'
]
===
'Y'
;
$oneGoods
[
'price'
]
=
self
::
transPrice
(
$value
[
'sales_price'
]);
$oneGoods
[
'count'
]
=
$value
[
'buy_number'
];
if
(
$isValid
)
{
if
(
$isValid
)
{
// 库存不足
$oneGoods
[
'lowStocks'
]
=
(
$value
[
'buy_number'
]
>
$value
[
'storage_number'
]);
}
//gift=>是否赠品,advanceBuy=>是否加价购,soldOut=>失效商品;
if
(
!
isset
(
$value
[
'goods_type'
]))
{
$oneGoods
[
'i
sSoldOut
'
]
=
true
;
$oneGoods
[
'i
nValid
'
]
=
true
;
}
elseif
(
$value
[
'goods_type'
]
==
'gift'
&&
!
isset
(
$value
[
'isAdvanceBuy'
]))
{
$oneGoods
[
'isGift'
]
=
true
;
}
elseif
(
$value
[
'goods_type'
]
==
'price_gift'
)
{
$oneGoods
[
'isAdvanceBuy'
]
=
true
;
}
else
{
$oneGoods
[
'showCheckbox'
]
=
true
;
}
// 上市期
if
(
$isAdvanceCart
&&
!
empty
(
$value
[
'expect_arrival_time'
]))
{
$oneGoods
[
'appearDate'
]
=
$value
[
'expect_arrival_time'
];
}
// 商品链接
if
(
isset
(
$value
[
'cn_alphabet'
]))
{
$oneGoods
[
'url'
]
=
self
::
url
(
'/product/pro_'
.
$value
[
'product_id'
]
.
'_'
.
$value
[
'goods_id'
]
.
'/'
.
$value
[
'cn_alphabet'
]
.
'.html'
);
}
$oneGoods
[
'link'
]
=
self
::
url
(
'/product/show_'
.
$value
[
'product_skn'
]
.
'.html'
);
$arr
[
$key
]
=
$oneGoods
;
}
...
...
template/m.yohobuy.com/partials/cart/good.phtml
View file @
001c1d8
...
...
@@ -4,11 +4,13 @@
{{/if}}
{{#if showCheckbox}}
<span class="checkbox{{#if checked}} icon-cb-checked{{^}} icon-checkbox{{/if}}iconfont"></span>
<span class="checkbox{{#if checked}} icon-cb-checked{{^}} icon-checkbox{{/if}}
iconfont"></span>
{{/if}}
<div class="info">
<img class="thumb lazy" data-original="{{thumb}}">
<a href="{{link}}">
<img class="thumb lazy" data-original="{{thumb}}">
</a>
{{#if isAdvanceBuy}}
<p class="few-tag plus-tag">加价购</p>
{{/if}}
...
...
@@ -17,7 +19,7 @@
{{/if}}
<div class="deps show">
<
p class="name row">{{name}}</p
>
<
a href="{{link}}" class="name row">{{name}}</a
>
<span class="count">
×{{count}}
</span>
...
...
Please
register
or
login
to post a comment