Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
YOHOBUYPC
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
2
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
Rock Zhang
9 years ago
Commit
137731d0d45d92d14dee911a85d1f0bf4c810fbe
1 parent
2b9efbd3
添加品友统计需要的有关数据
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
31 additions
and
23 deletions
template/www.yohobuy.com/partials/shopping/pinyou-analysis.phtml
yohobuy/www.yohobuy.com/application/models/Shopping/Pay.php
yohobuy/www.yohobuy.com/application/modules/Shopping/controllers/Pay.php
template/www.yohobuy.com/partials/shopping/pinyou-analysis.phtml
View file @
137731d
...
...
@@ -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.
2
z.Rg-AQqSqQi
2
GykX
12
LUxI
0
')+'&c='+e(h?h
[
2
]
:'')+'&s='+e(i?i
[
2
]
.match(/jump\%
3
D(\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);
}
}_();
...
...
yohobuy/www.yohobuy.com/application/models/Shopping/Pay.php
View file @
137731d
...
...
@@ -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
;
...
...
yohobuy/www.yohobuy.com/application/modules/Shopping/controllers/Pay.php
View file @
137731d
...
...
@@ -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
));
}
...
...
Please
register
or
login
to post a comment