function update(json)
{
	// Update upper cart summary.
	$('#cartSummary a').html(json.summary);
	
	// Get correct quantitiy section.
	var quantitySection = $('div#listingContainer span.qty').filter(function()
	{
		if($(this).children('form').size() > 0)
			return $(this).children('form').children('.productID').val() == json.productID;
		return false;
	});
	
	// Update form.
	if(json.list != undefined)
		quantitySection.html(json.list);
}
