Subversion Repositories SmartDukaan

Rev

Rev 7432 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 7432 Rev 7695
Line 180... Line 180...
180
			
180
			
181
			var isActive = (response['is_active'] === 'true');
181
			var isActive = (response['is_active'] === 'true');
182
			var isActiveOnStore = (response['active_on_store'] === 'true');
182
			var isActiveOnStore = (response['active_on_store'] === 'true');
183
			var selling_price = parseFloat(response['selling_price']).toFixed(2);
183
			var selling_price = parseFloat(response['selling_price']).toFixed(2);
184
			var absoluteMinPrice = parseFloat(response['absolute_min_price']).toFixed(2);
184
			var absoluteMinPrice = parseFloat(response['absolute_min_price']).toFixed(2);
185
			
185
 
186
			if(deliveryEstimate == -1)	{
186
			if(deliveryEstimate === '01 January 1970')	{
187
				$("#shipping_time").hide();
187
				$("#shipping_time").hide();
188
				$("#shipping_time_1").show();
188
				$("#shipping_time_1").show();
189
			} else	{
189
			} else	{
190
				$("#shipping_time").html("Get this product on <label class='red'>" + deliveryEstimate + "</label>");
190
				$("#shipping_time").html("Get this product on <label class='red'>" + deliveryEstimate + "</label>");
191
			}
191
			}
Line 205... Line 205...
205
				$("#addToCart").bind('click', function(){
205
				$("#addToCart").bind('click', function(){
206
			    	window.location = "/storewebsite/order-details?product_id=" + itemId + "&price=" + $('#mrp').text();
206
			    	window.location = "/storewebsite/order-details?product_id=" + itemId + "&price=" + $('#mrp').text();
207
				});
207
				});
208
			}
208
			}
209
			
209
			
-
 
210
			if(selling_price == 0) {
-
 
211
				$("#addToCart").text("NOT AVAILABLE");
-
 
212
				$("#addToCart").css("color", "black");
-
 
213
				$("#addToCart").unbind();
210
			
214
				
-
 
215
				$('#sellingPriceBox').val('N/A');
-
 
216
				$('#mrp').html('N/A');
-
 
217
				$('#minPrice').html('N/A');
-
 
218
				$('#maxPrice').html('N/A');
-
 
219
				$('#absMin').val(0);
-
 
220
				$('#cod').hide();
-
 
221
				$('#otg').hide();
-
 
222
				$('#item_id').val(itemId);
-
 
223
				
-
 
224
				$('#editSellingPriceButton').hide();
-
 
225
				$("#shipping_time").html("<label class='red'>Error in getting price.Please refresh this page.</label>");
-
 
226
			} else {
-
 
227
				$('#editSellingPriceButton').show();
211
			$('.warranty').html(response['best_deal_text']);
228
				$('.warranty').html(response['best_deal_text']);
212
			$('#mrp').html(selling_price);
229
				$('#mrp').html(selling_price);
213
			$('#minPrice').html(parseFloat(response['min_selling_price']).toFixed(2));
230
				$('#minPrice').html(parseFloat(response['min_selling_price']).toFixed(2));
214
			$('#maxPrice').html(parseFloat(response['max_selling_price']).toFixed(2));
231
				$('#maxPrice').html(parseFloat(response['max_selling_price']).toFixed(2));
215
			$('#sellingPriceBox').val(selling_price);
232
				$('#sellingPriceBox').val(selling_price);
216
			$('#absMin').val(absoluteMinPrice);
233
				$('#absMin').val(absoluteMinPrice);
217
			$('#cod').hide();
234
				$('#cod').hide();
218
			$('#otg').hide();
235
				$('#otg').hide();
219
			$('#item_id').val(itemId);
236
				$('#item_id').val(itemId);
-
 
237
			}
220
		}
238
		}
221
	});
239
	});
222
}
240
}
223
 
241
 
224
function load_most_compared_widget(){
242
function load_most_compared_widget(){