Subversion Repositories SmartDukaan

Rev

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

Rev 17477 Rev 17571
Line 422... Line 422...
422
    document.getElementById("error").style.display = "block";
422
    document.getElementById("error").style.display = "block";
423
    document.getElementById("error").innerHTML = "Invalid pincode!";
423
    document.getElementById("error").innerHTML = "Invalid pincode!";
424
  }
424
  }
425
}
425
}
426
 
426
 
-
 
427
function showMoreDeals(){
-
 
428
	window.location.href = base_url+"private-deals/1";
-
 
429
}
-
 
430
 
-
 
431
function quickAddToCart(id,catalogId){
-
 
432
	var email = document.getElementById("email").value;
-
 
433
	email = email.trim();
-
 
434
        var url = base_url+'cart/add/'+id+'/'+email+'/'+catalogId;
-
 
435
	microAjax(url, function(res)
-
 
436
        {
-
 
437
		if(res!='')
-
 
438
        {
-
 
439
          
-
 
440
          data = JSON.parse(res);
-
 
441
          if(data['addcart'][0].redirectUrl != undefined && data['addcart'][0].redirectUrl != ''){
-
 
442
            //window.history.replaceState("",document.title, base_url+'cart');
-
 
443
            /*if(typeof _gaq != "undefined" && _gaq != null)  {
-
 
444
              _gaq.push(['_trackEvent', 'Order', 'Add To Cart',itemId]);
-
 
445
            }*/
-
 
446
	ga('send', 'event', 'Order', 'Add To Cart',id);
-
 
447
            var ua = navigator.userAgent.toLowerCase();
-
 
448
            var redirectUrl = data['addcart'][0].redirectUrl;
-
 
449
            var isIE = ua.indexOf('msie') !== -1;
-
 
450
            if (isIE){
-
 
451
              window.location.replace(base_url+redirectUrl);
-
 
452
            }else{
-
 
453
              window.location.href = base_url+redirectUrl;
-
 
454
            }
-
 
455
          }else if(data['addcart'][0].message != undefined){
-
 
456
	      window.location.href=base_url+document.getElementById(id+"-url").value;	
-
 
457
          }
-
 
458
        }
-
 
459
	});
-
 
460
}
-
 
461
 
427
function shomoreredirect() {
462
function shomoreredirect() {
428
  window.location.href = base_url;
463
  window.location.href = base_url;
429
}
464
}
430
465