Hi Ray,
I ran into one more problem.
The code worked based on location, but when I switched to another language, the prices disappeared completely.
When I comment out this code, it works for all languages. When I don't, it works only for English.
The problem is the other languages still need to swap comma for dot.
/*if (languageid != 2) {
x = x.replace(".", ",");
} */
if (languageid != 2) {
y = y.replace(".", ",");
}
I wonder if y is displayed correctly because it is not based on a calculation, and x isn't because it is a calculated value.
I also commented out this
/*if (mylocation3 == "germany" || mylocation1 == "europe") document.getElementsByClassName("itempriceincl").innerHTML = x; */
And added it to this line. It didn't have an affect the problem described above.
if (mylocation3 == "germany" || mylocation1 == "europe") {
$('.itempriceincl').html('(' +currencysymbol+' '+x+' '+mwstincl+ ')');
}