function add_to_card(){
    alert('Добавлено в корзину.');
}

function foo(){
    alert('Hello ther!');
}
@@ -18,43 +18,130 @@
 ard(
+id
 )%7B%0A
-    alert('%D0%94%D0%BE%D0%B1%D0%B0%D0%B2%D0%BB%D0%B5%D0%BD%D0%BE %D0%B2 %D0%BA%D0%BE%D1%80%D0%B7%D0%B8%D0%BD%D1%83.'
+var key='prodoct_'+id;%0A    var x=window.localStorage.setItem(key);%0A    x=x*1+1;%0A    window.localStorage.getItem(key,x
 );%0A%7D

Update add_to_card function