...
|
...
|
@@ -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;
|
|
|
}
|
...
|
...
|
|