Authored by Rock Zhang

添加品友统计需要的有关数据

... ... @@ -2,8 +2,8 @@
<script>
<script>
!function(w,d,e){
var _orderno='{{orderNo}}';
var _money='{{money}}';
var _orderno='{{orderNum}}';
var _money='{{count}}';
var _productList='{{productList}}';
var b=location.href,c=d.referrer,f,s,g=d.cookie,h=g.match(/(^|;)\s*ipycookie=([^;]*)/),i=g.match(/(^|;)\s*ipysession=([^;]*)/);if (w.parent!=w){f=b;b=c;c=f;};u='//stats.ipinyou.com/cvt?a='+e('MC.2z.Rg-AQqSqQi2GykX12LUxI0')+'&c='+e(h?h[2]:'')+'&s='+e(i?i[2].match(/jump\%3D(\d+)/)[1]:'')+'&u='+e(b)+'&r='+e(c)+'&rd='+(new Date()).getTime()+'&OrderNo='+e(_orderno)+'&Money='+e(_money)+'&ProductList='+e(_productList)+'&e=';
function _(){if(!d.body){setTimeout(_(),100);}else{s= d.createElement('script');s.src = u;d.body.insertBefore(s,d.body.firstChild);}}_();
... ...
... ... @@ -66,6 +66,30 @@ class PayModel
$result['count'] = $order['payment_amount'];
$result['paymentType'] = ($order['payment_type'] == 1 ? '在线支付' : '货到付款');
//统计成交的skn
$sknList = array();
$skuList = array();
$goodsData = array();
$pinyouGoodsArr = array();
foreach ($order['order_goods'] as $val) {
$sknList[] = $val['product_skn'];
$skuList[] = $val['product_sku'];
$goodsData[] = array(
'goods_name' => $val['product_name'],
'product_sku' => $val['product_sku'],
'price' => $val['goods_price'],
'number' => $val['buy_number']
);
$pinyouGoodsArr[] = $val['product_id'] . ',' . $val['buy_number'];
}
$result['goodsData'] = $goodsData;
// skn列表
$result['sknList'] = implode(',', $sknList);
// sku列表
$result['skuList'] = implode(',', $skuList);
// 品友统计需要的商品数据
$result['pinyouGoods'] = implode(';', $pinyouGoodsArr);
// 货到付款的情况
if ($order['payment_type'] == 2) {
$result['finish'] = true;
... ... @@ -87,26 +111,6 @@ class PayModel
}
$result['deliveryType'] =isset($order['delivery_time']) ? $order['delivery_time'] : '';
//统计成交的skn
$sknList = array();
$skuList = array();
$goodsData = array();
foreach ($order['order_goods'] as $val) {
$sknList[] = $val['product_skn'];
$skuList[] = $val['product_sku'];
$goodsData[] = array(
'goods_name' => $val['product_name'],
'product_sku' => $val['product_sku'],
'price' => $val['goods_price'],
'number' => $val['buy_number']
);
}
$result['goodsData'] = $goodsData;
// skn列表
$result['sknList'] = implode(',', $sknList);
// sku列表
$result['skuList'] = implode(',', $skuList);
// 用户ID
$result['uid'] = $uid;
... ... @@ -220,7 +224,6 @@ class PayModel
$result['orderGoods'] = $order['order_goods'];
// 订单商品数(用于订单统计)
$result['ordersGoodsNums'] = count($order['order_goods']);
} while (false);
return $result;
... ...
... ... @@ -64,6 +64,11 @@ class PayController extends WebAction
$this->setSimpleHeader();
$this->_view->display($view, array(
'shoppingpay' =>$data,
'pinyou' => array(
'orderNum' => $data['orderNum'],
'count' => $data['count'],
'productList' => $data['pinyouGoods']
),
'payPage' => true
));
}
... ...