Authored by Rock Zhang

添加购物车商品链接地址

... ... @@ -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['isSelected'] = $value['selected'] === 'Y';
$oneGoods['checked'] = $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['isSoldOut'] = true;
$oneGoods['inValid'] = 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;
}
... ...
... ... @@ -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">
<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>
... ...