Subversion Repositories SmartDukaan

Rev

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

Rev 2320 Rev 2652
Line 15... Line 15...
15
    
15
    
16
	add_to_storage_set("histitems", prodid);
16
	add_to_storage_set("histitems", prodid);
17
    
17
    
18
    load_history_widget();
18
    load_history_widget();
19
 
19
 
-
 
20
    load_accessories_widget();
-
 
21
    
20
    /**
22
    /**
21
     * Code to track user clicks on Product slides and 'Proceed to Payment' option
23
     * Code to track user clicks on Product slides and 'Proceed to Payment' option
22
     */
24
     */
23
	$('a.vt').click(function(){
25
	$('a.vt').click(function(){
24
		trackEventWithGA('Product', $(this).children('span').text(), $('title').text().split('|')[0].trim());
26
		trackEventWithGA('Product', $(this).children('span').text(), $('title').text().split('|')[0].trim());
Line 129... Line 131...
129
	
131
	
130
	jQuery.ajax({
132
	jQuery.ajax({
131
		type: "GET",
133
		type: "GET",
132
		url: "/estimate/" + $("#zipcode").val() + "_" + itemId,
134
		url: "/estimate/" + $("#zipcode").val() + "_" + itemId,
133
		beforeSend: function()	{
135
		beforeSend: function()	{
134
			$("#days").html("<img src='../images/loader_l.gif'>");
136
			$("#days").html("<img src='/images/loader_l.gif'>");
135
		},
137
		},
136
		success: function(msg)	{
138
		success: function(msg)	{
137
			$("#shipping_time").html(msg);
139
			$("#shipping_time").html(msg);
138
		}
140
		}
139
	});
141
	});
140
}
142
}
141
 
143
 
-
 
144
function load_accessories_widget(){
-
 
145
	jQuery.ajax({
-
 
146
		type : "GET",
-
 
147
		url : "/related-accessories/" + $("#product_id").val(),
-
 
148
		cache: false,
-
 
149
		success : function(html) {
-
 
150
   		    $("#accessories").html(html);
-
 
151
 
-
 
152
		    // Product Title
-
 
153
		    $("#accessories table td div a").each(function() {
-
 
154
					$(this).truncate({addtitle : true});
-
 
155
		    });
-
 
156
 
-
 
157
		    // Product Price
-
 
158
		    $("#accessories table td div div.price").each(function() {
-
 
159
					$(this).truncate({addtitle : true});
-
 
160
			});
-
 
161
 
-
 
162
		    // Product Details
-
 
163
		    $("#accessories table td div div.text").each(function() {
-
 
164
					$(this).truncate( {addtitle : true});
-
 
165
			});
-
 
166
	    }
-
 
167
	});
-
 
168
}