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
hf
9 years ago
Commit
e9dd2f0718dd402b789541e1244bd179c47825fc
1 parent
86a077c7
code review by hf: do add analysis code
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
78 additions
and
1 deletions
template/m.yohobuy.com/actions/index/home/order-detail.phtml
template/m.yohobuy.com/actions/index/home/pay.phtml
yohobuy/m.yohobuy.com/application/controllers/Home.php
yohobuy/m.yohobuy.com/application/models/Home/Order.php
template/m.yohobuy.com/actions/index/home/order-detail.phtml
View file @
e9dd2f0
...
...
@@ -98,4 +98,38 @@
{
{/
orderDetail
}
}
</div>
<script>_ozprm=
"orderid={{orderCode}}&ordertotal={{orderTotal}}"
;</script>
<script
type=
"text/javascript"
src
=
"http://static.yohobuy.com/m/v1/js/AG_Tracking.js"
></script>
<script
type=
"text/javascript"
>
var
_agq
=
_agq
||
[]
;
_agq.push(
[
'_cid'
,
'
415
'
]
);
//生成value
_agq.push(
[
'_eid'
,
'
102
'
]
);
//生成value
_agq.push(
[
'_orderSum'
,
"{{orderTotal}}"
]
);//订单金额,客户在页面填写
_agq.push(
[
'_orderNo'
,
"{{orderCode}}"
]
);//订单号,客户在页面填写
_agq.push(
[
'_orderNew'
,
"{{isOldUser}}"
]
);//是否新客单,客户标记是为true否为
false
_agq.push(
[
'_orderCount'
,
"{{orderCount}}"
]
);//订单货品数目,客户填写
ag_send(_agq);
var
__order_code
=
"{{orderCode}}"
;
var
__order_amount
=
"{{orderTotal}}"
;
var
__order_user
=
"{{isOldUser}}"
;
var
__order_goods_num
=
{
{orderCount
}
};
var
__order_uid
=
'
{
{uid
}
}';
var
_fxcmd=_fxcmd||
[]
;
_fxcmd.push(
[
'trackOrder'
,
{
oid:
"{{orderCode}}"
,
otp
:
"{{orderTotalFormat}}"
,
unid
:
"{{uid}}"
}]
);
</script>
<script
type=
"text/javascript"
src=
"//static.criteo.net/js/ld/ld.js"
async=
"true"
></script>
<script
type=
"text/javascript"
>
window.criteo_q
=
window.criteo_q
||
[]
;
window.criteo_q.push(
{
event:
"setAccount"
,
account
:
[
21397
]
}
,
{
event:
"setHashedEmail"
,
email
:
""
}
,
{
event:
"setSiteType"
,
type
:
"m"
}
,
{
event:
"trackTransaction"
,
id
:
"{{orderCode}}"
,
currency
:
"CNY"
,
item
:
""
}
);
</script>
{
{>
layout/footer
}
}
...
...
template/m.yohobuy.com/actions/index/home/pay.phtml
View file @
e9dd2f0
...
...
@@ -33,5 +33,39 @@
</div>
</div>
<script>_ozprm=
"orderid={{orderCode}}&ordertotal={{orderTotal}}"
;</script>
<script
type=
"text/javascript"
src
=
"http://static.yohobuy.com/m/v1/js/AG_Tracking.js"
></script>
<script
type=
"text/javascript"
>
var
_agq
=
_agq
||
[]
;
_agq.push(
[
'_cid'
,
'
415
'
]
);
//生成value
_agq.push(
[
'_eid'
,
'
102
'
]
);
//生成value
_agq.push(
[
'_orderSum'
,
"{{orderTotal}}"
]
);//订单金额,客户在页面填写
_agq.push(
[
'_orderNo'
,
"{{orderCode}}"
]
);//订单号,客户在页面填写
_agq.push(
[
'_orderNew'
,
"{{isOldUser}}"
]
);//是否新客单,客户标记是为true否为
false
_agq.push(
[
'_orderCount'
,
"{{orderCount}}"
]
);//订单货品数目,客户填写
ag_send(_agq);
var
__order_code
=
"{{orderCode}}"
;
var
__order_amount
=
"{{orderTotal}}"
;
var
__order_user
=
"{{isOldUser}}"
;
var
__order_goods_num
=
{
{orderCount
}
};
var
__order_uid
=
'
{
{uid
}
}';
var
_fxcmd=_fxcmd||
[]
;
_fxcmd.push(
[
'trackOrder'
,
{
oid:
"{{orderCode}}"
,
otp
:
"{{orderTotalFormat}}"
,
unid
:
"{{uid}}"
}]
);
</script>
<script
type=
"text/javascript"
src=
"//static.criteo.net/js/ld/ld.js"
async=
"true"
></script>
<script
type=
"text/javascript"
>
window.criteo_q
=
window.criteo_q
||
[]
;
window.criteo_q.push(
{
event:
"setAccount"
,
account
:
[
21397
]
}
,
{
event:
"setHashedEmail"
,
email
:
""
}
,
{
event:
"setSiteType"
,
type
:
"m"
}
,
{
event:
"trackTransaction"
,
id
:
"{{orderCode}}"
,
currency
:
"CNY"
,
item
:
""
}
);
</script>
{
{>
layout/footer
}
}
...
...
yohobuy/m.yohobuy.com/application/controllers/Home.php
View file @
e9dd2f0
...
...
@@ -793,7 +793,7 @@ class HomeController extends AbstractAction
if
(
empty
(
$orderCode
))
{
$this
->
error
();
}
/* 判断订单信息是否存在 */
$orderDetail
=
OrderModel
::
orderDetail
(
$orderCode
,
$this
->
_uid
,
$this
->
_usession
);
if
(
empty
(
$orderDetail
))
{
...
...
@@ -832,6 +832,10 @@ class HomeController extends AbstractAction
'hasWxShare'
=>
$hasWxShare
,
'orderCode'
=>
$orderCode
,
'orderTotal'
=>
isset
(
$orderDetail
[
'goodsAmount'
])
?
$orderDetail
[
'goodsAmount'
]
:
0
,
'orderTotalFormat'
=>
isset
(
$orderDetail
[
'goodsAmount'
])
?
sprintf
(
"%d"
,
$orderDetail
[
'goodsAmount'
])
:
0
,
'orderCount'
=>
isset
(
$orderDetail
[
'orderCount'
])
?
$orderDetail
[
'orderCount'
]
:
0
,
'isOldUser'
=>
(
isset
(
$_COOKIE
[
'_isOldUser'
])
&&
$_COOKIE
[
'_isOldUser'
]
==
'4'
)
?
'true'
:
'false'
,
'uid'
=>
$this
->
_uid
,
));
}
...
...
@@ -927,6 +931,10 @@ class HomeController extends AbstractAction
'orderDetail'
=>
$orderDetail
,
'orderCode'
=>
$orderCode
,
'orderTotal'
=>
isset
(
$orderDetail
[
'goodsAmount'
])
?
$orderDetail
[
'goodsAmount'
]
:
0
,
'orderTotalFormat'
=>
isset
(
$orderDetail
[
'goodsAmount'
])
?
sprintf
(
"%d"
,
$orderDetail
[
'goodsAmount'
])
:
0
,
'orderCount'
=>
isset
(
$orderDetail
[
'orderCount'
])
?
intval
(
$orderDetail
[
'orderCount'
])
:
0
,
'isOldUser'
=>
(
isset
(
$_COOKIE
[
'_isOldUser'
])
&&
$_COOKIE
[
'_isOldUser'
]
==
'4'
)
?
'true'
:
'false'
,
'uid'
=>
$this
->
_uid
,
));
}
...
...
yohobuy/m.yohobuy.com/application/models/Home/Order.php
View file @
e9dd2f0
...
...
@@ -151,6 +151,7 @@ class OrderModel
$result
[
'yohoCoin'
]
=
$orderDetail
[
'data'
][
'yoho_coin_num'
];
// YOHO币
$result
[
'price'
]
=
$orderDetail
[
'data'
][
'amount'
];
// 实付金额
$result
[
'goodsAmount'
]
=
$orderDetail
[
'data'
][
'payment_amount'
];
// 商品总金额没有人民币符号
$result
[
'orderCount'
]
=
$count
;
// 订单总件数
}
}
...
...
Please
register
or
login
to post a comment