Subversion Repositories SmartDukaan

Rev

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

Rev 1812 Rev 1820
Line 19... Line 19...
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
 
22
 
23
		//Tracking this click for Google Analytics
23
		//Tracking this click for Google Analytics
24
		if(_gaq)	{
24
		if(_gaq && _gaq != null && _gaq != undefined)	{
25
			_gaq.push(['_trackEvent', 'Order', 'Add to Cart', catalogid, 2]);
25
			_gaq.push(['_trackEvent', 'Order', 'Add to Cart', catalogid, 2]);
26
		}
26
		}
27
		
27
		
28
		var radBtn = "";
28
		var radBtn = "";
29
		var param = "PARAMETERS_" + catalogid;
29
		var param = "PARAMETERS_" + catalogid;
Line 85... Line 85...
85
	var bValid = true;
85
	var bValid = true;
86
	var selected = $(".colorSelLightBoxColor .content input[name='radColorSel']:checked");
86
	var selected = $(".colorSelLightBoxColor .content input[name='radColorSel']:checked");
87
	var itemid = selected.val();
87
	var itemid = selected.val();
88
	
88
	
89
	//Tracking this click for Google Analytics
89
	//Tracking this click for Google Analytics
-
 
90
	if(_gaq && _gaq != null && _gaq != undefined)	{
90
	_gaq.push(['_trackEvent', 'Order', 'Select Product Color', itemid, 2]);
91
		_gaq.push(['_trackEvent', 'Order', 'Select Product Color', itemid, 2]);
-
 
92
	}
91
	
93
	
92
	if(itemid == undefined)	{
94
	if(itemid == undefined)	{
93
		alert('Please select a color.');
95
		alert('Please select a color.');
94
	} else	{
96
	} else	{
95
		addToCart(itemid,'list');
97
		addToCart(itemid,'list');
Line 121... Line 123...
121
    	  seldata.unshift(refdivid);
123
    	  seldata.unshift(refdivid);
122
          var tot=1;
124
          var tot=1;
123
     }
125
     }
124
 
126
 
125
     //Tracking this click for Google Analytics
127
     //Tracking this click for Google Analytics
126
     if(_gaq)	{
128
     if(_gaq && _gaq != null && _gaq != undefined)	{
127
     	_gaq.push(['_trackEvent', 'Research', 'Add to Research', seldata + "", 2]);
129
     	_gaq.push(['_trackEvent', 'Research', 'Add to Research', seldata + "", 2]);
128
     }
130
     }
129
     
131
     
130
     if(tot > 0)	{
132
     if(tot > 0)	{
131
          //alert("AJAX request to add products in My research. Product ID: "+seldata+" and total: "+tot);
133
          //alert("AJAX request to add products in My research. Product ID: "+seldata+" and total: "+tot);