| 17584 |
manish.sha |
1 |
|
| 11024 |
lgm |
2 |
<?php $orderConfirmation = $recharge_orderconfirmation[0];?>
|
| 10582 |
lgm |
3 |
<div class="r-hldr">
|
|
|
4 |
<div class="r-head">Recharge Details</div>
|
|
|
5 |
<div class="r-cont clearfix">
|
|
|
6 |
<div>Order Id</div>
|
|
|
7 |
<div><?php echo $recharge_orderconfirmation[0]->response->rechargeDisplayId; ?></div>
|
|
|
8 |
</div>
|
|
|
9 |
<div class="r-cont clearfix">
|
|
|
10 |
<div>Status</div>
|
|
|
11 |
<div><?php echo $recharge_orderconfirmation[0]->response->rechargeStatus; ?></div>
|
| 12990 |
anikendra |
12 |
<?php if(isset($recharge_orderconfirmation[0]->response->isOperatorAsynchronous) && $recharge_orderconfirmation[0]->response->isOperatorAsynchronous ==1):?>
|
|
|
13 |
<div id="countdown" style="margin:10px auto;display:block;"></div>
|
| 12997 |
anikendra |
14 |
<div id="rechargestatus"><?php echo $orderConfirmation->response->detailDisplayMessage;?></div>
|
| 17571 |
manish.sha |
15 |
|
| 12990 |
anikendra |
16 |
<script src="//code.jquery.com/jquery-1.11.0.min.js"></script>
|
| 13010 |
anikendra |
17 |
<script src="/assets/js/jquery.countdown360.js" type="text/javascript" charset="utf-8"></script>
|
| 12990 |
anikendra |
18 |
|
| 13010 |
anikendra |
19 |
<script type="text/javascript" charset="utf-8">
|
|
|
20 |
var callCounter = 0;
|
|
|
21 |
$("#countdown").countdown360({
|
|
|
22 |
radius: 50,
|
| 13266 |
amit.gupta |
23 |
seconds: 90,
|
| 13010 |
anikendra |
24 |
fontColor: 'white',
|
|
|
25 |
fillStyle: '#6699ff',
|
|
|
26 |
strokeStyle: '#F6F47A',
|
|
|
27 |
autostart: true,
|
|
|
28 |
onComplete: function() {
|
|
|
29 |
hideCountDown()
|
|
|
30 |
}
|
|
|
31 |
})
|
|
|
32 |
|
|
|
33 |
function hideCountDown() {
|
|
|
34 |
$('#countdown').hide();
|
|
|
35 |
jQuery.ajax({
|
|
|
36 |
type: "GET",
|
| 13013 |
anikendra |
37 |
url: "/recharge-status?rechargeOrderId=<?php echo substr($recharge_orderconfirmation[0]->response->rechargeDisplayId,4);?>&finalCall=true",
|
| 13010 |
anikendra |
38 |
success: function(response) {},
|
|
|
39 |
error: function() {}
|
|
|
40 |
});
|
|
|
41 |
window.setTimeout(reload, 5000);
|
|
|
42 |
}
|
|
|
43 |
|
|
|
44 |
function checkUnknownTransactions() {
|
|
|
45 |
jQuery.ajax({
|
|
|
46 |
type: "GET",
|
| 13046 |
anikendra |
47 |
url: "/recharge-status?rechargeOrderId=<?php echo substr($recharge_orderconfirmation[0]->response->rechargeDisplayId,4);?>&finalCall=false",
|
| 13010 |
anikendra |
48 |
success: function(response) {
|
|
|
49 |
if (response == 'RECHARGE_SUCCESSFUL' || response == 'RECHARGE_FAILED' || response == 'PAYMENT_SUCCESSFUL') {
|
|
|
50 |
reload();
|
|
|
51 |
}
|
|
|
52 |
incrementCounter();
|
|
|
53 |
if ($('#countdown').is(':visible')) {
|
| 13488 |
anikendra |
54 |
if (callCounter < 5) {
|
|
|
55 |
window.setTimeout(checkUnknownTransactions, 10000);
|
| 13010 |
anikendra |
56 |
}
|
|
|
57 |
}
|
|
|
58 |
},
|
|
|
59 |
error: function() {
|
|
|
60 |
incrementCounter();
|
|
|
61 |
if ($('#countdown').is(':visible')) {
|
| 13488 |
anikendra |
62 |
if (callCounter < 5) {
|
|
|
63 |
window.setTimeout(checkUnknownTransactions, 10000);
|
| 13010 |
anikendra |
64 |
}
|
|
|
65 |
}
|
| 12990 |
anikendra |
66 |
}
|
| 13010 |
anikendra |
67 |
});
|
|
|
68 |
}
|
|
|
69 |
|
|
|
70 |
function incrementCounter() {
|
|
|
71 |
callCounter++;
|
|
|
72 |
}
|
|
|
73 |
|
|
|
74 |
function reload() {
|
|
|
75 |
location.reload();
|
|
|
76 |
}
|
| 12990 |
anikendra |
77 |
</script>
|
|
|
78 |
<script type="text/javascript">
|
|
|
79 |
$(function(){
|
| 13010 |
anikendra |
80 |
if ($('#countdown').is(':visible')){
|
|
|
81 |
window.setTimeout(checkUnknownTransactions, 40000);
|
|
|
82 |
}
|
|
|
83 |
});
|
| 12990 |
anikendra |
84 |
</script>
|
| 13010 |
anikendra |
85 |
|
| 12990 |
anikendra |
86 |
<?php endif;?>
|
|
|
87 |
|
| 10582 |
lgm |
88 |
</div>
|
|
|
89 |
<div class="r-info">
|
|
|
90 |
<div class="r-info-head clearfix">
|
| 10939 |
lgm |
91 |
<?php if(strpos($recharge_orderconfirmation[0]->response->rechargeDisplayId, 'DTH') !== false){?>
|
|
|
92 |
<div>Account Number</div>
|
|
|
93 |
<?php } else{?>
|
|
|
94 |
<div>Mobile Number</div><?php } ?>
|
| 10582 |
lgm |
95 |
<div>Operator</div>
|
|
|
96 |
<div>Amount</div>
|
|
|
97 |
</div>
|
|
|
98 |
<div class="r-info-body clearfix">
|
|
|
99 |
<div><?php echo $recharge_orderconfirmation[0]->response->rechargeDeviceNumber ?></div>
|
|
|
100 |
<div><?php echo $recharge_orderconfirmation[0]->response->rechargeProvider ?></div>
|
|
|
101 |
<div><?php echo $recharge_orderconfirmation[0]->response->totalAmount ?></div>
|
|
|
102 |
</div>
|
|
|
103 |
</div><!--o-info-->
|
|
|
104 |
|
|
|
105 |
</div><!--o-hldr-->
|
| 17581 |
manish.sha |
106 |
<script type="text/javascript">
|
|
|
107 |
var orderConfirmation = <?php echo json_encode($orderConfirmation);?>;
|
|
|
108 |
if(orderConfirmation != undefined){
|
|
|
109 |
var amount = parseFloat(orderConfirmation['response'].totalAmount).toFixed(2);
|
|
|
110 |
var orderId = orderConfirmation['response'].rechargeDisplayId;
|
|
|
111 |
var deviceNumber = orderConfirmation['response'].rechargeDeviceNumber;
|
| 17580 |
manish.sha |
112 |
|
| 17581 |
manish.sha |
113 |
ga('ecommerce:addTransaction', {
|
|
|
114 |
'id': orderId, // Transaction ID. Required
|
|
|
115 |
'affiliation': 'Saholic', // Affiliation or store name
|
|
|
116 |
'revenue': amount, // Grand Total
|
|
|
117 |
'shipping': '0', // Shipping
|
|
|
118 |
'tax': '0' // Tax
|
|
|
119 |
});
|
|
|
120 |
// addItem should be called for every item in the shopping cart.
|
|
|
121 |
ga('ecommerce:addItem', {
|
|
|
122 |
'id': orderId, // Transaction ID. Required
|
|
|
123 |
'sku': deviceNumber, // SKU/code
|
|
|
124 |
'name': orderConfirmation['response'].rechargeProvider, // Product name. Required
|
|
|
125 |
'category': 'Digital', // Category or variation
|
|
|
126 |
'price': amount, // Unit price
|
|
|
127 |
'quantity': '1' // Quantity
|
|
|
128 |
});
|
|
|
129 |
ga('ecommerce:send'); // Send transaction and item data to Google Analytics.
|
|
|
130 |
}
|
|
|
131 |
var pheight = Math.max(document.documentElement.clientHeight, window.innerHeight || 0);
|
|
|
132 |
var value = localStorage.getItem('rechargeValue');
|
|
|
133 |
if(parseInt(value) == 1){
|
|
|
134 |
ga('send', 'event', 'Recharge', 'Recharge Result','Mobile-Result');
|
|
|
135 |
}else if(parseInt(value) == 2){
|
|
|
136 |
ga('send', 'event', 'Recharge', 'Recharge Result','Recharge-Result');
|
|
|
137 |
}
|
|
|
138 |
// if(document.getElementsByClassName('order-conf')[0] != undefined){
|
|
|
139 |
// document.getElementsByClassName('order-conf')[0].style.minHeight = pheight - 153 +'px';
|
|
|
140 |
// }
|
|
|
141 |
</script>
|
| 17584 |
manish.sha |
142 |
|
|
|
143 |
<?php $rechargestatus = array("RECHARGE IN PROCESS");?>
|
|
|
144 |
<?php
|
|
|
145 |
if(isset($privatedeals['response']['items']) && (!empty($privatedeals['response']['items']))){
|
|
|
146 |
?>
|
|
|
147 |
<input type="hidden" id="email" value="<?php echo $authorized['email']?>">
|
|
|
148 |
<div class="recommended-cart-pd">
|
|
|
149 |
<div class="head">
|
|
|
150 |
<div>Recommended For You</div>
|
| 17589 |
manish.sha |
151 |
<div id="view-more-deals" style="display:block;" <?php if(!in_array($recharge_orderconfirmation[0]->response->rechargeStatus, $rechargestatus)){?> onclick="showMoreDeals()" <?php }?>>View More</div>
|
| 17584 |
manish.sha |
152 |
</div>
|
|
|
153 |
<div class="rec-cart-hldr" id="swipe_0">
|
|
|
154 |
<div class="rec-cart-wrapper">
|
|
|
155 |
<?php foreach ($privatedeals['response']['items'] as $product) {?>
|
|
|
156 |
<input type="hidden" id="<?php echo $product['itemPojos'][0]['id'] ;?>-url" value="<?php echo $product['url'];?>">
|
|
|
157 |
<div class="rec-cart-product">
|
|
|
158 |
<?php if (in_array($recharge_orderconfirmation[0]->response->rechargeStatus, $rechargestatus)){ ?>
|
|
|
159 |
<img src="<?php echo $product['image_url']; ?>" alt="recomended" onerror="imgDefault()"/>
|
|
|
160 |
<?php } else {?>
|
|
|
161 |
<a href="<?php echo base_url().$product['url'];?>"><img src="<?php echo $product['image_url']; ?>" alt="recomended" onerror="imgDefault()"/></a>
|
|
|
162 |
<?php }?>
|
|
|
163 |
<div class="pd-cart-name"><?php echo $product['title']; ?></div>
|
|
|
164 |
<div class="pd-cart-desc"><?php echo $product['description']; ?></div>
|
|
|
165 |
<div class="pd-cart-price"><span>Rs</span><span><?php if(isset($product['itemPojos'][0]['sellingPrice'])){echo $product['itemPojos'][0]['sellingPrice']; }?> </span><span style="color: red"><?php echo $product['itemPojos'][0]['dealPojo']['dealPrice']; ?></span></div>
|
|
|
166 |
<?php if(!in_array($recharge_orderconfirmation[0]->response->rechargeStatus, $rechargestatus)){?>
|
|
|
167 |
<div class="quickbuy-hldr clear" onclick="quickAddToCart(<?php echo $product['itemPojos'][0]['id'] ;?>,<?php echo $product['id']; ?>)">
|
|
|
168 |
<div class="quickbuy-btn btn">
|
|
|
169 |
add to cart
|
|
|
170 |
</div>
|
|
|
171 |
</div>
|
|
|
172 |
<?php }?>
|
|
|
173 |
</div>
|
|
|
174 |
<?php } ?>
|
|
|
175 |
</div>
|
|
|
176 |
</div><!--rec-hldr-->
|
|
|
177 |
</div><!--recomended-pd-->
|
|
|
178 |
<?php
|
|
|
179 |
}?>
|