var sum = "0,00"; var currency = ""; // euro-sign does not work in cookies. Now it will be appended after reading the cookie var count = 0; sum = sum.substring(sum.indexOf(" ")); if(sum=="N/A") sum="0,00"; sum = sum + " " + currency; setTempCookie( "basket_count", count, "/" ); setTempCookie( "basket_sum", sum, "/" );