Subversion Repositories SmartDukaan

Rev

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

Rev 11870 Rev 13026
Line 404... Line 404...
404
	});
404
	});
405
	
405
	
406
	$('.cart-item-quantity').change(function(){
406
	$('.cart-item-quantity').change(function(){
407
		var itemId = $(this).attr("id").split('_')[1];
407
		var itemId = $(this).attr("id").split('_')[1];
408
		var quantity = parseInt($(this).val());
408
		var quantity = parseInt($(this).val());
409
		
409
		//Quantity is now changed to 20
410
		if (quantity > 5)	{
410
		if (quantity > 20)	{
411
			alert("You can not order more than 5 pieces of same product.");
411
			alert("You can not order more than 20 pieces of same product.");
412
			$(obj).focus();
412
			$(obj).focus();
413
		}
413
		}
414
		else	{
414
		else	{
415
			submit("/cart/" + itemId  + "?_method=put&productid=" + itemId + "&quantity=" + quantity, "POST", []);
415
			submit("/cart/" + itemId  + "?_method=put&productid=" + itemId + "&quantity=" + quantity, "POST", []);
416
		}
416
		}