
function something()
{

	var x =window.localStorage.getItem('cc');
	
	x = x * 1 + 1;

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

	alert(x);	
	
}


function add_to_cart(id)
{

	var key_id = 'product_' + id;
 	var x = window.localStorage.getItem(key_id);
 	x = x * 1 + 1;
 	window.localStorage.setItem(key_id, x);

 	// var total = 0; //Total numbers of products ordered

	

 	// for(var i in localStorage)
		// {
		//     console.log(localStorage[i]);
		// }
		// 	for(var i=0, len=localStorage.length; i<len; i++) {
		//     var key = localStorage.key(i);
		//     var value = localStorage[key];
		//     total = total  + value*1;
		//     console.log("Total = " + total);
		//     window.localStorage.setItem("total", total);
		    
		// }


}



@@ -308,437 +308,8 @@
 );%0A%0A
- %09// var total = 0; //Total numbers of products ordered%0A%0A%09%0A%0A %09// for(var i in localStorage)%0A%09%09// %7B%0A%09%09//     console.log(localStorage%5Bi%5D);%0A%09%09// %7D%0A%09%09// %09for(var i=0, len=localStorage.length; i%3Clen; i++) %7B%0A%09%09//     var key = localStorage.key(i);%0A%09%09//     var value = localStorage%5Bkey%5D;%0A%09%09//     total = total  + value*1;%0A%09%09//     console.log(%22Total = %22 + total);%0A%09%09//     window.localStorage.setItem(%22total%22, total);%0A%09%09    %0A%09%09// %7D%0A%0A
 %0A%7D%0A%0A

Fix 2 Show numbers of products on cart