Authored by Rock Zhang

添加结算页中加价购或者赠品的标识

Code Review By Rock Zhang
... ... @@ -630,17 +630,10 @@ class Helpers
$oneGoods['id'] = $single['product_skn'];
$oneGoods['name'] = $single['product_name'];
$oneGoods['thumb'] = !empty($single['goods_images']) ? Images::getImageUrl($single['goods_images'], 120, 160) : '';
$oneGoods['price'] = self::transPrice($single['last_price']);
$oneGoods['price'] = self::transPrice($single['sales_price']);
$oneGoods['marketPrice'] = self::transPrice($single['market_price']);
$oneGoods['count'] = $single['storage_number'];
//gift=>是否赠品,advanceBuy=>是否加价购,soldOut=>失效商品;
if ($single['goods_type'] == 'gift' && !isset($single['isAdvanceBuy'])) {
$oneGoods['isGift'] = true;
} elseif ($single['goods_type'] == 'price_gift') {
$oneGoods['isAdvanceBuy'] = true;
}
$gift['goods'][] = $oneGoods;
}
... ...
... ... @@ -424,6 +424,13 @@ class CartModel
$oneGoods['price'] = Helpers::transPrice($single['sales_price']);
$oneGoods['count'] = $single['buy_number'];
//gift=>是否赠品,advanceBuy=>是否加价购;
if ($single['goods_type'] == 'gift' && !isset($single['isAdvanceBuy'])) {
$oneGoods['isGift'] = true;
} elseif ($single['goods_type'] == 'price_gift') {
$oneGoods['isAdvanceBuy'] = true;
}
$result['goods'][] = $oneGoods;
}
}
... ...