Authored by hf

do fixes some bugs

... ... @@ -633,11 +633,13 @@ class Helpers
$gift = array();
$oneGoods = array();
$number = 0;
foreach ($advanceGoods as $value) {
$gift = array();
$gift['promotionId'] = $value['promotion_id'];
$gift['promotionTitle'] = $value['promotion_title'];
$number = 0;
foreach ($value['goods_list'] as $single) {
$oneGoods = array();
$oneGoods['id'] = $single['product_skn'];
... ... @@ -648,12 +650,14 @@ class Helpers
$oneGoods['count'] = $single['storage_number'];
$gift['goods'][] = $oneGoods;
$number ++;
}
$arr[] = $gift;
// 计算加价购商品数目
$count += count($value['goods_list']);
//$count += count($value['goods_list']);
$count += $number;
}
return $arr;
... ...
... ... @@ -38,9 +38,10 @@ var _hmt = _hmt || [];
window._py = window._py||[];
window._py.push(['a', 'MC..o8vMMWxEXDCiqYckD81lUX']);
window._py.push(['domain','stats.ipinyou.com']);
if(typeof _goodsData!='undefined')
window._py.push(['pi',_goodsData]);
window._py.push(['e','']);
if(typeof _goodsData!='undefined'){
window._py.push(['pi',_goodsData]);
}
-function(d){
var f = 'https:' == d.location.protocol;var c = d.createElement('script');c.type='text/javascript';c.async=1;
c.src=(f ? 'https' : 'http') + '://'+(f?'fm.ipinyou.com':'fm.p0y.cn')+'/j/t/adv.js';
... ...
... ... @@ -325,7 +325,7 @@ class CartModel
$pay = CartData::cartPay($uid, $cartType);
// 商品为空返回
if (!$pay || (isset($pay['data']['goods_list']) && empty($pay['data']['goods_list']))) {
if (!$pay || empty($pay['data']['goods_list'])) {
$result['cartUrl'] = Helpers::url('/cart/index/index');
return $result;
}
... ...