Subversion Repositories SmartDukaan

Rev

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

Rev 2762 Rev 2810
Line 103... Line 103...
103
    		 data: "productid=" + seldata,
103
    		 data: "productid=" + seldata,
104
    		 success: function(msg){
104
    		 success: function(msg){
105
    			 if(msg==""){
105
    			 if(msg==""){
106
    				 window.location = "/cart";
106
    				 window.location = "/cart";
107
    			 }else{
107
    			 }else{
108
    				 displayRelatedProducts(msg, catalogid);
108
    				 displayRelatedProducts(msg);
109
    			 }
109
    			 }
110
    		 }
110
    		 }
111
    	 });
111
    	 });
112
     } else	{
112
     } else	{
113
    	 alert("Please select atleast one product");
113
    	 alert("Please select atleast one product");
Line 128... Line 128...
128
		addToCart(itemid,'list', catalogid);
128
		addToCart(itemid,'list', catalogid);
129
	}
129
	}
130
}
130
}
131
 
131
 
132
 
132
 
133
function displayRelatedProducts(message, catalogId){
133
function displayRelatedProducts(message){
134
	var radBtn = "<div id='cartRecommendationBox'>";
-
 
135
	jQuery.ajax({
-
 
136
		type: "GET",
-
 
137
		url: "/related-products/" + catalogId,
-
 
138
		success: function(msg)	{
-
 
139
			radBtn += "<h3 style='margin-top:5px; margin-bottom:5px;'>" + message + "</h3>";
-
 
140
			if($.trim(msg)!=""){
-
 
141
				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/>";
-
 
142
			}
-
 
143
			radBtn += msg;
-
 
144
			radBtn += '<div class="clearBoth"></div></div>';
-
 
145
			
-
 
146
	    	$.colorbox({
134
	$.colorbox({
147
	    		html:radBtn,
135
		html:message,
148
	    		width:"400px",
136
		width:"400px",
149
	    		height:"410px",
137
		height:"410px",
150
	    		
138
		
151
	    		onComplete: function(){
139
		onComplete: function(){
152
	    			$('#cartRecommendationBox').show().find('.widgetChkBox').hide();
140
			$('#cartRecommendationBox').show().find('.widgetChkBox').hide();
153
	    		},
141
		},
154
	    		onCleanup: function(){
142
		onCleanup: function(){
155
	    			$('#cartRecommendationBox').hide();
143
			$('#cartRecommendationBox').hide();
156
	    		}
-
 
157
	    	});
-
 
158
		}
144
		}
159
	});		
145
	});		
160
}
146
}
161
 
147
 
162
 
148