Subversion Repositories SmartDukaan

Rev

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

Rev 26512 Rev 26744
Line 15... Line 15...
15
 
15
 
16
	$(".compare-with").live('click', function() {
16
	$(".compare-with").live('click', function() {
17
		$("#compareItem").show();
17
		$("#compareItem").show();
18
	});
18
	});
19
 
19
 
20
	$(".product-compare-info").live(
20
	$(".product-compare-info").live('click',function() {
21
			'click',
-
 
22
			function() {
-
 
23
				catalogIds = [1021975, 1022020];
21
		catalogIds = [1021975, 1022020];
24
				if(typeof compareCatalogId!="undefined") {
22
		if(typeof compareCatalogId!="undefined") {
25
					catalogIds.push(compareCatalogId);
23
			catalogIds.push(compareCatalogId);
26
				}
24
		}
27
				doAjaxRequestHandler(context
-
 
28
						+ "/getProductCompareInfo?catalogIds=" + catalogIds.join(","), "GET",
25
		doAjaxRequestHandler(`${context}/getProductCompareInfo?catalogIds=` + catalogIds.join(","), "GET", 
29
						function(response) {
26
		function(response) {
30
					console.log(response)
27
			console.log(response)
31
							$('#' + "main-content").html(response);
28
			$('#' + "main-content").html(response);
32
						});
29
		});
33
			});
30
	});
34
});
31
});
35
 
32
 
36
function loadItems(domId) {
33
function loadItems(domId) {
37
	doAjaxRequestHandler(context + "/getProducts", "GET", function(response) {
34
	doAjaxRequestHandler(context + "/getProducts", "GET", function(response) {
38
		$('#' + domId).html(response);
35
		$('#' + domId).html(response);
39
	});
36
	});
40
 
-
 
41
}
37
}