Subversion Repositories SmartDukaan

Rev

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

Rev 15837 Rev 17573
Line 770... Line 770...
770
		// 	'1'                   // Quantity.
770
		// 	'1'                   // Quantity.
771
		// ]);
771
		// ]);
772
		//  _gaq.push(['_trackTrans']); //submits transaction to the Analytics servers
772
		//  _gaq.push(['_trackTrans']); //submits transaction to the Analytics servers
773
 	// }
773
 	// }
774
 }
774
 }
-
 
775
 
-
 
776
 
-
 
777
 function showMoreDeals(){
-
 
778
		window.location.href = base_url+"private-deals/1";
-
 
779
	}
-
 
780
 
-
 
781
	function quickAddToCart(id,catalogId){
-
 
782
		var email = document.getElementById("email").value;
-
 
783
		email = email.trim();
-
 
784
	        var url = base_url+'cart/add/'+id+'/'+email+'/'+catalogId;
-
 
785
		microAjax(url, function(res)
-
 
786
	        {
-
 
787
			if(res!='')
-
 
788
	        {
-
 
789
	          
-
 
790
	          data = JSON.parse(res);
-
 
791
	          if(data['addcart'][0].redirectUrl != undefined && data['addcart'][0].redirectUrl != ''){
-
 
792
	            //window.history.replaceState("",document.title, base_url+'cart');
-
 
793
	            /*if(typeof _gaq != "undefined" && _gaq != null)  {
-
 
794
	              _gaq.push(['_trackEvent', 'Order', 'Add To Cart',itemId]);
-
 
795
	            }*/
-
 
796
		ga('send', 'event', 'Order', 'Add To Cart',id);
-
 
797
	            var ua = navigator.userAgent.toLowerCase();
-
 
798
	            var redirectUrl = data['addcart'][0].redirectUrl;
-
 
799
	            var isIE = ua.indexOf('msie') !== -1;
-
 
800
	            if (isIE){
-
 
801
	              window.location.replace(base_url+redirectUrl);
-
 
802
	            }else{
-
 
803
	              window.location.href = base_url+redirectUrl;
-
 
804
	            }
-
 
805
	          }else if(data['addcart'][0].message != undefined){
-
 
806
		      window.location.href=base_url+document.getElementById(id+"-url").value;	
-
 
807
	          }
-
 
808
	        }
-
 
809
		});
-
 
810
	}
775
811