Subversion Repositories SmartDukaan

Rev

Rev 11342 | Rev 12524 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 11342 Rev 12084
Line 25... Line 25...
25
    </div>
25
    </div>
26
  </div><!--o-info-->
26
  </div><!--o-info-->
27
  
27
  
28
</div><!--o-hldr-->
28
</div><!--o-hldr-->
29
<script type="text/javascript">
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
    _gaq.push(['_addTrans',
-
 
36
      orderId,                     // Transaction ID. Required.
-
 
37
      'Saholic',   // Affiliation or store name.
-
 
38
      amount,               // Grand Total.
-
 
39
      '0',                  // Shipping.
-
 
40
      '0',                     // Tax.
-
 
41
      "",
-
 
42
      "",
-
 
43
      "India"
-
 
44
    ]);
-
 
45
    _gaq.push(['_addItem',
-
 
46
      orderId,                     // Transaction ID. Required.     
-
 
47
      deviceNumber,                 // SKU/code.
-
 
48
      orderConfirmation['response'].rechargeProvider,    // Product name. Required.
-
 
49
      'Digital',         // Category or variation.
-
 
50
      amount,                 // Unit price.
-
 
51
      '1'                   // Quantity.
-
 
52
    ]);
-
 
53
     _gaq.push(['_trackTrans']); //submits transaction to the Analytics servers
30
 
54
  }
-
 
55
  var pheight = Math.max(document.documentElement.clientHeight, window.innerHeight || 0);
31
var value = localStorage.getItem('rechargeValue');
56
  var value = localStorage.getItem('rechargeValue');
32
  if(parseInt(value) == 1){
57
  if(parseInt(value) == 1){
33
    if(typeof _gaq != "undefined" && _gaq != null)  {
58
    if(typeof _gaq != "undefined" && _gaq != null)  {
34
        _gaq.push(['_trackEvent', 'Recharge', 'Recharge Result','Mobile-Result']);
59
        _gaq.push(['_trackEvent', 'Recharge', 'Recharge Result','Mobile-Result']);
35
      } 
60
      } 
36
  }else if(parseInt(value) == 2){
61
  }else if(parseInt(value) == 2){
37
    if(typeof _gaq != "undefined" && _gaq != null)  {
62
    if(typeof _gaq != "undefined" && _gaq != null)  {
38
        _gaq.push(['_trackEvent', 'Recharge', 'Recharge Result','Recharge-Result']);
63
        _gaq.push(['_trackEvent', 'Recharge', 'Recharge Result','Recharge-Result']);
39
      } 
64
      } 
40
  }
65
  }
41
  var orderConfirmation = <?php echo json_encode($orderConfirmation);?>;
-
 
42
  var pheight = Math.max(document.documentElement.clientHeight, window.innerHeight || 0);
-
 
43
  // if(document.getElementsByClassName('order-conf')[0] != undefined){
66
  // if(document.getElementsByClassName('order-conf')[0] != undefined){
44
  //     document.getElementsByClassName('order-conf')[0].style.minHeight = pheight - 153 +'px';  
67
  //     document.getElementsByClassName('order-conf')[0].style.minHeight = pheight - 153 +'px';  
45
  // }
68
  // }
46
</script>
69
</script>
47
 
70