Subversion Repositories SmartDukaan

Rev

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

Rev 11885 Rev 11913
Line 685... Line 685...
685
}
685
}
686
var url;
686
var url;
687
 url = document.URL;
687
 url = document.URL;
688
 if(url.indexOf('pay-success') != -1){
688
 if(url.indexOf('pay-success') != -1){
689
  if(orderConfirmation != undefined){
689
  if(orderConfirmation != undefined){
-
 
690
    if(!storeName){
-
 
691
	storeName = 'Saholic';
690
    
692
    }
-
 
693
    console.log(storeName);
691
    var orders = orderConfirmation['result']['orders'];
694
    var orders = orderConfirmation['result']['orders'];
692
    for(i=0;i<orders.length;i++){
695
    for(i=0;i<orders.length;i++){
693
      debugger
696
      debugger
694
      var amount = orders[i].totalAmount.replace(',','');
697
      var amount = orders[i].totalAmount.replace(',','');
695
      amount = parseFloat(amount).toFixed(2);
698
      amount = parseFloat(amount).toFixed(2);
696
      var orderId = orders[i].orderId;
699
      var orderId = orders[i].orderId;
697
      _gaq.push(['_addTrans',
700
      _gaq.push(['_addTrans',
698
          orderId,                     // Transaction ID. Required.
701
          orderId,                     // Transaction ID. Required.
699
          'Saholic',   // Affiliation or store name.
702
          storeName,   // Affiliation or store name.
700
          amount,               // Grand Total.
703
          amount,               // Grand Total.
701
          '0',                  // Shipping.
704
          '0',                  // Shipping.
702
          '0',                     // Tax.
705
          '0',                     // Tax.
703
          "",
706
          "",
704
          "",
707
          "",