Subversion Repositories SmartDukaan

Rev

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

Rev 11938 Rev 17575
Line 406... Line 406...
406
    }
406
    }
407
    laste = e.currentTarget;
407
    laste = e.currentTarget;
408
  //}
408
  //}
409
}
409
}
410
 
410
 
-
 
411
function showMoreDeals(){
-
 
412
	window.location.href = base_url+"private-deals/1";
-
 
413
}
-
 
414
 
-
 
415
function quickAddToCart(id,catalogId){
-
 
416
	var email = document.getElementById("email").value;
-
 
417
	email = email.trim();
-
 
418
        var url = base_url+'cart/add/'+id+'/'+email+'/'+catalogId;
-
 
419
	microAjax(url, function(res)
-
 
420
        {
-
 
421
		if(res!='')
-
 
422
        {
-
 
423
          
-
 
424
          data = JSON.parse(res);
-
 
425
          if(data['addcart'][0].redirectUrl != undefined && data['addcart'][0].redirectUrl != ''){
-
 
426
            //window.history.replaceState("",document.title, base_url+'cart');
-
 
427
            /*if(typeof _gaq != "undefined" && _gaq != null)  {
-
 
428
              _gaq.push(['_trackEvent', 'Order', 'Add To Cart',itemId]);
-
 
429
            }*/
-
 
430
	ga('send', 'event', 'Order', 'Add To Cart',id);
-
 
431
            var ua = navigator.userAgent.toLowerCase();
-
 
432
            var redirectUrl = data['addcart'][0].redirectUrl;
-
 
433
            var isIE = ua.indexOf('msie') !== -1;
-
 
434
            if (isIE){
-
 
435
              window.location.replace(base_url+redirectUrl);
-
 
436
            }else{
-
 
437
              window.location.href = base_url+redirectUrl;
-
 
438
            }
-
 
439
          }else if(data['addcart'][0].message != undefined){
-
 
440
	      window.location.href=base_url+document.getElementById(id+"-url").value;	
-
 
441
          }
-
 
442
        }
-
 
443
	});
-
 
444
}
-
 
445
 
411
 
446