function something()
{
	var x = window.localStorage.getItem('aaa');

	x = x*1 + 1;

	window.localStorage.setItem('aaa', x);

	alert(x);
}


function add_to_cart(id)
{
	alert('You added pizza with id:' + id);
}

function something()
{
	var x = window.localStorage.getItem('aaa');

	x = x*1 + 1;

	window.localStorage.setItem('aaa', x);

	alert(x);
}


function add_to_cart(id)
{
	var key = 'product_' + id;	
	
	var x = window.localStorage.getItem(key);
	x = x*1 + 1;
	window.localStorage.setItem(key, x);
}



Update add_to_cart function + refactoring
Update add_to_cart function + refactoring
