| 12694 |
anikendra |
1 |
<?php $orderConfirmation = $recharge_orderconfirmation[0];?>
|
|
|
2 |
<div class="r-hldr">
|
|
|
3 |
<div class="r-head">Recharge Details</div>
|
|
|
4 |
<div class="r-cont clearfix">
|
|
|
5 |
<div>Order Id</div>
|
|
|
6 |
<div><?php echo $recharge_orderconfirmation[0]->response->rechargeDisplayId; ?></div>
|
|
|
7 |
</div>
|
|
|
8 |
<div class="r-cont clearfix">
|
|
|
9 |
<div>Status</div>
|
|
|
10 |
<div><?php echo $recharge_orderconfirmation[0]->response->rechargeStatus; ?></div>
|
|
|
11 |
</div>
|
|
|
12 |
<div class="r-info">
|
|
|
13 |
<div class="r-info-head clearfix">
|
|
|
14 |
<?php if(strpos($recharge_orderconfirmation[0]->response->rechargeDisplayId, 'DTH') !== false){?>
|
|
|
15 |
<div>Account Number</div>
|
|
|
16 |
<?php } else{?>
|
|
|
17 |
<div>Mobile Number</div><?php } ?>
|
|
|
18 |
<div>Operator</div>
|
|
|
19 |
<div>Amount</div>
|
|
|
20 |
</div>
|
|
|
21 |
<div class="r-info-body clearfix">
|
|
|
22 |
<div><?php echo $recharge_orderconfirmation[0]->response->rechargeDeviceNumber ?></div>
|
|
|
23 |
<div><?php echo $recharge_orderconfirmation[0]->response->rechargeProvider ?></div>
|
|
|
24 |
<div><?php echo $recharge_orderconfirmation[0]->response->totalAmount ?></div>
|
|
|
25 |
</div>
|
|
|
26 |
</div><!--o-info-->
|
|
|
27 |
|
|
|
28 |
</div><!--o-hldr-->
|
|
|
29 |
<script type="text/javascript">
|
|
|
30 |
var orderConfirmation = <?php echo json_encode($orderConfirmation);?>;
|
|
|
31 |
if(orderConfirmation != undefined){
|
|
|
32 |
var amount = parseFloat(orderConfirmation['response'].totalAmount).toFixed(2);
|
|
|
33 |
var orderId = orderConfirmation['response'].rechargeDisplayId;
|
|
|
34 |
var deviceNumber = orderConfirmation['response'].rechargeDeviceNumber;
|
|
|
35 |
/*
|
|
|
36 |
_gaq.push(['_addTrans',
|
|
|
37 |
orderId, // Transaction ID. Required.
|
|
|
38 |
'Saholic', // Affiliation or store name.
|
|
|
39 |
amount, // Grand Total.
|
|
|
40 |
'0', // Shipping.
|
|
|
41 |
'0', // Tax.
|
|
|
42 |
"",
|
|
|
43 |
"",
|
|
|
44 |
"India"
|
|
|
45 |
]);
|
|
|
46 |
_gaq.push(['_addItem',
|
|
|
47 |
orderId, // Transaction ID. Required.
|
|
|
48 |
deviceNumber, // SKU/code.
|
|
|
49 |
orderConfirmation['response'].rechargeProvider, // Product name. Required.
|
|
|
50 |
'Digital', // Category or variation.
|
|
|
51 |
amount, // Unit price.
|
|
|
52 |
'1' // Quantity.
|
|
|
53 |
]);
|
|
|
54 |
_gaq.push(['_trackTrans']); //submits transaction to the Analytics servers
|
|
|
55 |
*/
|
|
|
56 |
ga('ecommerce:addTransaction', {
|
|
|
57 |
'id': orderId, // Transaction ID. Required
|
|
|
58 |
'affiliation': 'Saholic', // Affiliation or store name
|
|
|
59 |
'revenue': amount, // Grand Total
|
|
|
60 |
'shipping': '0', // Shipping
|
|
|
61 |
'tax': '0' // Tax
|
|
|
62 |
});
|
|
|
63 |
// addItem should be called for every item in the shopping cart.
|
|
|
64 |
ga('ecommerce:addItem', {
|
|
|
65 |
'id': orderId, // Transaction ID. Required
|
|
|
66 |
'sku': deviceNumber, // SKU/code
|
|
|
67 |
'name': orderConfirmation['response'].rechargeProvider, // Product name. Required
|
|
|
68 |
'category': 'Digital', // Category or variation
|
|
|
69 |
'price': amount, // Unit price
|
|
|
70 |
'quantity': '1' // Quantity
|
|
|
71 |
});
|
|
|
72 |
ga('ecommerce:send'); // Send transaction and item data to Google Analytics.
|
|
|
73 |
}
|
|
|
74 |
var pheight = Math.max(document.documentElement.clientHeight, window.innerHeight || 0);
|
|
|
75 |
var value = localStorage.getItem('rechargeValue');
|
|
|
76 |
if(parseInt(value) == 1){
|
|
|
77 |
ga('send', 'event', 'Recharge', 'Recharge Result','Mobile-Result');
|
|
|
78 |
/*if(typeof _gaq != "undefined" && _gaq != null) {
|
|
|
79 |
_gaq.push(['_trackEvent', 'Recharge', 'Recharge Result','Mobile-Result']);
|
|
|
80 |
} */
|
|
|
81 |
}else if(parseInt(value) == 2){
|
|
|
82 |
/*if(typeof _gaq != "undefined" && _gaq != null) {
|
|
|
83 |
_gaq.push(['_trackEvent', 'Recharge', 'Recharge Result','Recharge-Result']);
|
|
|
84 |
} */
|
|
|
85 |
ga('send', 'event', 'Recharge', 'Recharge Result','Recharge-Result');
|
|
|
86 |
}
|
|
|
87 |
// if(document.getElementsByClassName('order-conf')[0] != undefined){
|
|
|
88 |
// document.getElementsByClassName('order-conf')[0].style.minHeight = pheight - 153 +'px';
|
|
|
89 |
// }
|
|
|
90 |
</script>
|