Subversion Repositories SmartDukaan

Rev

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

Rev 2755 Rev 2762
Line 27... Line 27...
27
	$('a.vt').click(function(){
27
	$('a.vt').click(function(){
28
		trackEventWithGA('Product', $(this).children('span').text(), $('title').text().split('|')[0].trim());
28
		trackEventWithGA('Product', $(this).children('span').text(), $('title').text().split('|')[0].trim());
29
	});
29
	});
30
	
30
	
31
    $("#addcart").click(function(){
31
    $("#addcart").click(function(){
-
 
32
    	var catalogid = $("#product_id").val();
32
		jQuery.ajax({
33
		jQuery.ajax({
33
			type: "POST",
34
			type: "POST",
34
			url: "/addtocart",
35
			url: "/addtocart",
35
			data: "productid=" + $("#item_id").val(),
36
			data: "productid=" + $("#item_id").val(),
36
			success: function(msg)	{
37
			success: function(msg)	{
37
	   			 if(msg==""){
38
	   			 if(msg==""){
38
					 window.location = "/cart";
39
					 window.location = "/cart";
39
				 }else{
40
				 }else{
40
					 displayRelatedProducts(msg);
41
					 displayRelatedProducts(msg, catalogid);
41
				 }			
42
				 }			
42
	   		}
43
	   		}
43
		});
44
		});
44
	});
45
	});
45
	
46