Subversion Repositories SmartDukaan

Rev

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

Rev 2731 Rev 2754
Line 16... Line 16...
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();
20
    load_accessories_widget();
21
    
21
 
22
    myNotes.getNotes();
22
    myNotes.getNotes();
23
    
23
    
24
    /**
24
    /**
25
     * Code to track user clicks on Product slides and 'Proceed to Payment' option
25
     * Code to track user clicks on Product slides and 'Proceed to Payment' option
26
     */
26
     */
Line 35... Line 35...
35
			data: "productid=" + $("#item_id").val(),
35
			data: "productid=" + $("#item_id").val(),
36
			success: function(msg)	{
36
			success: function(msg)	{
37
	   			 if(msg==""){
37
	   			 if(msg==""){
38
					 window.location = "/cart";
38
					 window.location = "/cart";
39
				 }else{
39
				 }else{
40
					 alert(msg);
40
					 displayRelatedProducts(msg);
41
				 }			}
41
				 }			
-
 
42
	   		}
42
		});
43
		});
43
	});
44
	});
44
	
45
	
45
	$("#colorselector").change(function(){
46
	$("#colorselector").change(function(){
46
		var itemid = $("#colorselector option:selected").val();
47
		var itemid = $("#colorselector option:selected").val();
47
 
-
 
48
		$('#sp').html(PARAMETERS[itemid].SP);
48
		$('#sp').html(PARAMETERS[itemid].SP);
49
		$('#mrp').html(PARAMETERS[itemid].MRP);
49
		$('#mrp').html(PARAMETERS[itemid].MRP);
50
		$('#saving').html(PARAMETERS[itemid].SAVING);
50
		$('#saving').html(PARAMETERS[itemid].SAVING);
51
		$("#item_id").val(itemid);
51
		$("#item_id").val(itemid);
52
		updateEstimate(itemid);
52
		updateEstimate(itemid);
Line 63... Line 63...
63
		$("#item_id").val(itemid);
63
		$("#item_id").val(itemid);
64
		return false;
64
		return false;
65
	});
65
	});
66
 
66
 
67
	$("#util_compare").click(function() {
67
	$("#util_compare").click(function() {
68
		$.fn.colorbox({inline:true, href:".colorSelLightBoxColor", open:true, onComplete:function(){
68
		$.fn.colorbox({inline:true, href:"#compareLightBox", open:true, onComplete:function(){
69
			var posLeft = (document.documentElement.clientWidth / 2) - (parseInt($('#colorbox').css('width')) / 2);
69
			var posLeft = (document.documentElement.clientWidth / 2) - (parseInt($('#colorbox').css('width')) / 2);
70
			var posTop = (document.documentElement.clientHeight / 2) - (parseInt($('#colorbox').css('height')) / 2);
70
			var posTop = (document.documentElement.clientHeight / 2) - (parseInt($('#colorbox').css('height')) / 2);
71
	
71
	
72
			$('#colorbox').css('top', posTop);
72
			$('#colorbox').css('top', posTop);
73
			$('#colorbox').css('left', posLeft);
73
			$('#colorbox').css('left', posLeft);
Line 115... Line 115...
115
		}
115
		}
116
		var productOne = $("#catelog_id").val();
116
		var productOne = $("#catelog_id").val();
117
		window.location = "/compare-mobile-phones?p1="+productOne+"&p2="+productTwo;	
117
		window.location = "/compare-mobile-phones?p1="+productOne+"&p2="+productTwo;	
118
	}
118
	}
119
    
119
    
-
 
120
    function displayRelatedProducts(message){
-
 
121
    	var radBtn = "";
-
 
122
    	jQuery.ajax({
-
 
123
			type: "GET",
-
 
124
			url: "/related-products/" + $("#product_id").val(),
-
 
125
			data: "productid=" + $("#product_id").val(),
-
 
126
			success: function(msg)	{
-
 
127
				radBtn += "<h3 style='margin-top:5px; margin-bottom:5px;'>" + message + "</h3>";
-
 
128
				if($.trim(msg)!=""){
-
 
129
					radBtn += "<span style='font-size:14px; color:#003300; background-color:#ffffdd;  margin-bottom:8px;'>You can check out following similar products</span><hr size=1/>";
-
 
130
				}
-
 
131
				radBtn += msg;
-
 
132
				radBtn += '<div class="clearBoth"></div>';
-
 
133
				$("#colorSelLightBoxColor").html(radBtn);
-
 
134
				
-
 
135
		    	$.colorbox({
-
 
136
		    		inline:true,
-
 
137
		    		width:"400px",
-
 
138
		    		height:"410px",
-
 
139
		    		href:"#colorSelLightBoxColor",
-
 
140
		    		
-
 
141
		    		onComplete: function(){
-
 
142
		    			$('#colorSelLightBoxColor').show().find('.widgetChkBox').hide();
-
 
143
		    		},
-
 
144
		    		onCleanup: function(){
-
 
145
		    			$('#colorSelLightBoxColor').hide();
-
 
146
		    		}
-
 
147
		    	});
-
 
148
			}
-
 
149
		});		
-
 
150
    }
-
 
151
 
120
});
152
});
121
 
153
 
122
function changeSignInClass(){
154
function changeSignInClass(){
123
	if(document.getElementById("signinClass").className.indexOf("signin1") > -1)	{
155
	if(document.getElementById("signinClass").className.indexOf("signin1") > -1)	{
124
		document.getElementById("signinClass").className = 'signin';
156
		document.getElementById("signinClass").className = 'signin';