|
@@ -576,30 +576,31 @@ class Helpers |
|
@@ -576,30 +576,31 @@ class Helpers |
576
|
$oneGoods['thumb'] = !empty($value['goods_images']) ? Images::getImageUrl($value['goods_images'], 90, 100) : '';
|
576
|
$oneGoods['thumb'] = !empty($value['goods_images']) ? Images::getImageUrl($value['goods_images'], 90, 100) : '';
|
577
|
$oneGoods['color'] = $value['color_name'];
|
577
|
$oneGoods['color'] = $value['color_name'];
|
578
|
$oneGoods['size'] = $value['size_name'];
|
578
|
$oneGoods['size'] = $value['size_name'];
|
579
|
- $oneGoods['isSelected'] = $value['selected'] === 'Y';
|
579
|
+ $oneGoods['checked'] = $value['selected'] === 'Y';
|
580
|
$oneGoods['price'] = self::transPrice($value['sales_price']);
|
580
|
$oneGoods['price'] = self::transPrice($value['sales_price']);
|
581
|
$oneGoods['count'] = $value['buy_number'];
|
581
|
$oneGoods['count'] = $value['buy_number'];
|
582
|
|
582
|
|
583
|
- if ($isValid) {
|
583
|
+ if ($isValid) { // 库存不足
|
584
|
$oneGoods['lowStocks'] = ($value['buy_number'] > $value['storage_number']);
|
584
|
$oneGoods['lowStocks'] = ($value['buy_number'] > $value['storage_number']);
|
585
|
}
|
585
|
}
|
586
|
|
586
|
|
587
|
//gift=>是否赠品,advanceBuy=>是否加价购,soldOut=>失效商品;
|
587
|
//gift=>是否赠品,advanceBuy=>是否加价购,soldOut=>失效商品;
|
588
|
if (!isset($value['goods_type'])) {
|
588
|
if (!isset($value['goods_type'])) {
|
589
|
- $oneGoods['isSoldOut'] = true;
|
589
|
+ $oneGoods['inValid'] = true;
|
590
|
} elseif ($value['goods_type'] == 'gift' && !isset($value['isAdvanceBuy'])) {
|
590
|
} elseif ($value['goods_type'] == 'gift' && !isset($value['isAdvanceBuy'])) {
|
591
|
$oneGoods['isGift'] = true;
|
591
|
$oneGoods['isGift'] = true;
|
592
|
} elseif ($value['goods_type'] == 'price_gift') {
|
592
|
} elseif ($value['goods_type'] == 'price_gift') {
|
593
|
$oneGoods['isAdvanceBuy'] = true;
|
593
|
$oneGoods['isAdvanceBuy'] = true;
|
|
|
594
|
+ } else {
|
|
|
595
|
+ $oneGoods['showCheckbox'] = true;
|
594
|
}
|
596
|
}
|
|
|
597
|
+
|
595
|
// 上市期
|
598
|
// 上市期
|
596
|
if ($isAdvanceCart && !empty($value['expect_arrival_time'])) {
|
599
|
if ($isAdvanceCart && !empty($value['expect_arrival_time'])) {
|
597
|
$oneGoods['appearDate'] = $value['expect_arrival_time'];
|
600
|
$oneGoods['appearDate'] = $value['expect_arrival_time'];
|
598
|
}
|
601
|
}
|
599
|
// 商品链接
|
602
|
// 商品链接
|
600
|
- if (isset($value['cn_alphabet'])) {
|
|
|
601
|
- $oneGoods['url'] = self::url('/product/pro_' . $value['product_id'] . '_' . $value['goods_id'] . '/' . $value['cn_alphabet'] . '.html');
|
|
|
602
|
- }
|
603
|
+ $oneGoods['link'] = self::url('/product/show_' . $value['product_skn'] . '.html');
|
603
|
|
604
|
|
604
|
$arr[$key] = $oneGoods;
|
605
|
$arr[$key] = $oneGoods;
|
605
|
}
|
606
|
}
|