Subversion Repositories SmartDukaan

Rev

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

Rev 9721 Rev 9722
Line 405... Line 405...
405
		if (quantity > 5)	{
405
		if (quantity > 5)	{
406
			alert("You can not order more than 5 pieces of same product.");
406
			alert("You can not order more than 5 pieces of same product.");
407
			$(obj).focus();
407
			$(obj).focus();
408
		}
408
		}
409
		else	{
409
		else	{
410
				$.post("/cart/" + itemId + "?_method=put&productid=" + itemId + "&quantity=" + quantity);
410
			submit("/cart/" + itemId  + "?_method=put&productid=" + itemId + "&quantity=" + quantity, "POST", []);
411
				
-
 
412
		}
411
		}
413
	});
412
	});
414
	
413
	
415
	$('#submitAddress').click(function(){
414
	$('#submitAddress').click(function(){
416
		if($('#guardianName').length > 0 && $('#guardianName').val() === '') {
415
		if($('#guardianName').length > 0 && $('#guardianName').val() === '') {
Line 555... Line 554...
555
				}
554
				}
556
				$("#block" + "_" + item_id).show();
555
				$("#block" + "_" + item_id).show();
557
			}
556
			}
558
		});
557
		});
559
	}
558
	}
-
 
559
}
-
 
560
 
-
 
561
function submit(action, method, values) {
-
 
562
    var form = $('<form/>', {
-
 
563
        action: action,
-
 
564
        method: method
-
 
565
    });
-
 
566
    $.each(values, function() {
-
 
567
        form.append($('<input/>', {
-
 
568
            type: 'hidden',
-
 
569
            name: this.name,
-
 
570
            value: this.value
-
 
571
        }));    
-
 
572
    });
-
 
573
    form.appendTo('body').submit();
560
}
574
}
561
575