Subversion Repositories SmartDukaan

Rev

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

Rev 4489 Rev 4530
Line 22... Line 22...
22
    load_most_compared_widget();
22
    load_most_compared_widget();
23
 
23
 
24
    myNotes.getNotes();
24
    myNotes.getNotes();
25
    
25
    
26
    // Fix to always show first image's title on page load
26
    // Fix to always show first image's title on page load
-
 
27
    if ("undefined" != typeof(title_1)){
27
    $('.slides .modelName').html(title_1[0]);
28
        $('.slides .modelName').html(title_1[0]);
-
 
29
    }
-
 
30
    
28
    
31
    
29
    function getSeletectedItemId(){
32
    function getSeletectedItemId(){
30
    	 return $("#item_id").val();
33
    	 return $("#item_id").val();
31
    }
34
    }
32
    
35
    
Line 46... Line 49...
46
    	jQuery.ajax({
49
    	jQuery.ajax({
47
			type: "POST",
50
			type: "POST",
48
			url: "/addtocart",
51
			url: "/addtocart",
49
			data: "productid=" + getSeletectedItemId(),
52
			data: "productid=" + getSeletectedItemId(),
50
			success: function(msg)	{
53
			success: function(msg)	{
51
	   			 if(msg==""){
54
	   			 if(msg == "") {
52
	   				 trackEventWithGA('Order', 'Add to Cart', getSeletectedItemId() + '');
55
	   				 trackEventWithGA('Order', 'Add to Cart', getSeletectedItemId() + '');
53
					 window.location = "/cart";
56
					 window.location = "/cart";
54
				 }else{
57
				 } else {
55
					 displayRelatedProducts(msg);
58
					 displayRelatedProducts(msg);
56
				 }			
59
				 }
57
	   		}
60
	   		}
58
		});
61
		});
59
	});
62
	});
60
	
63
	
61
	$("#colorSelector").change(function(){
64
	$("#colorSelector").change(function(){