Subversion Repositories SmartDukaan

Rev

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

Rev 1761 Rev 1795
Line 17... Line 17...
17
 
17
 
18
$(function() {
18
$(function() {
19
 
19
 
20
	$("a.addtocart").live('click', function() {
20
	$("a.addtocart").live('click', function() {
21
		var catalogid = $(this).attr('catalogid');
21
		var catalogid = $(this).attr('catalogid');
-
 
22
 
-
 
23
		//Tracking this click for Google Analytics
22
		//alert("clicked add to cart" + catalogid);
24
		_gaq.push(['_trackEvent', 'Order', 'Add to Cart', catalogid, 2]);
23
		
25
		
24
		var radBtn = "";
26
		var radBtn = "";
25
		var param = "PARAMETERS_" + catalogid;
27
		var param = "PARAMETERS_" + catalogid;
26
	
28
	
27
		$.each(eval(param), function(val, text) {
29
		$.each(eval(param), function(val, text) {
Line 80... Line 82...
80
function selectColor(){
82
function selectColor(){
81
	var bValid = true;
83
	var bValid = true;
82
	var selected = $(".colorSelLightBoxColor .content input[name='radColorSel']:checked");
84
	var selected = $(".colorSelLightBoxColor .content input[name='radColorSel']:checked");
83
	var itemid = selected.val();
85
	var itemid = selected.val();
84
	
86
	
-
 
87
	//Tracking this click for Google Analytics
-
 
88
	_gaq.push(['_trackEvent', 'Order', 'Select Product Color', itemid, 2]);
-
 
89
	
85
	if(itemid == undefined){
90
	if(itemid == undefined)	{
86
		alert('Please select a color.');
91
		alert('Please select a color.');
87
	}else{
92
	} else	{
88
		addToCart(itemid,'list');
93
		addToCart(itemid,'list');
89
		$.colorbox.close();
94
		$.colorbox.close();
90
	}
95
	}
91
}
96
}
92
 
97
 
Line 112... Line 117...
112
          var tot=1;
117
          var tot=1;
113
     }else if(reqtype=="list"){
118
     }else if(reqtype=="list"){
114
    	  seldata.unshift(refdivid);
119
    	  seldata.unshift(refdivid);
115
          var tot=1;
120
          var tot=1;
116
     }
121
     }
-
 
122
 
-
 
123
 	//Tracking this click for Google Analytics
-
 
124
 	_gaq.push(['_trackEvent', 'Research', 'Add to Research', seldata, 2]);
117
     
125
 	
118
     if(tot>0){
126
     if(tot > 0)	{
119
          //alert("AJAX request to add products in My research. Product ID: "+seldata+" and total: "+tot);
127
          //alert("AJAX request to add products in My research. Product ID: "+seldata+" and total: "+tot);
120
          jQuery.ajax({
128
          jQuery.ajax({
121
               type: "POST",
129
               type: "POST",
122
                      url: "/addtoresearch",
130
                      url: "/addtoresearch",
123
                      data: "productid=["+seldata+"]",
131
                      data: "productid=["+seldata+"]",