Subversion Repositories SmartDukaan

Rev

Rev 17572 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 17572 Rev 17578
Line 1134... Line 1134...
1134
function closeShipmentDetails(){
1134
function closeShipmentDetails(){
1135
	$("#shipmentDetails").hide();
1135
	$("#shipmentDetails").hide();
1136
	
1136
	
1137
	scrollWindow('myAccount', 1000);
1137
	scrollWindow('myAccount', 1000);
1138
}
1138
}
1139
 
-
 
1140
function showMoreDeals(){
-
 
1141
	window.location.href = base_url+"private-deals/1";
-
 
1142
}
-
 
1143
 
-
 
1144
function quickAddToCart(id,catalogId){
-
 
1145
	var email = document.getElementById("email").value;
-
 
1146
	email = email.trim();
-
 
1147
        var url = base_url+'cart/add/'+id+'/'+email+'/'+catalogId;
-
 
1148
	microAjax(url, function(res)
-
 
1149
        {
-
 
1150
		if(res!='')
-
 
1151
        {
-
 
1152
          
-
 
1153
          data = JSON.parse(res);
-
 
1154
          if(data['addcart'][0].redirectUrl != undefined && data['addcart'][0].redirectUrl != ''){
-
 
1155
            //window.history.replaceState("",document.title, base_url+'cart');
-
 
1156
            /*if(typeof _gaq != "undefined" && _gaq != null)  {
-
 
1157
              _gaq.push(['_trackEvent', 'Order', 'Add To Cart',itemId]);
-
 
1158
            }*/
-
 
1159
	ga('send', 'event', 'Order', 'Add To Cart',id);
-
 
1160
            var ua = navigator.userAgent.toLowerCase();
-
 
1161
            var redirectUrl = data['addcart'][0].redirectUrl;
-
 
1162
            var isIE = ua.indexOf('msie') !== -1;
-
 
1163
            if (isIE){
-
 
1164
              window.location.replace(base_url+redirectUrl);
-
 
1165
            }else{
-
 
1166
              window.location.href = base_url+redirectUrl;
-
 
1167
            }
-
 
1168
          }else if(data['addcart'][0].message != undefined){
-
 
1169
	      window.location.href=base_url+document.getElementById(id+"-url").value;	
-
 
1170
          }
-
 
1171
        }
-
 
1172
	});
-
 
1173
}
-