Fix country and currency selection

This commit is contained in:
2024-04-01 19:00:57 +02:00
parent ff4b802d00
commit 0bb757abab
3 changed files with 7 additions and 6 deletions

View File

@@ -140,5 +140,6 @@
"doc": "Doc", "doc": "Doc",
"firefox 125": "Firefox 125", "firefox 125": "Firefox 125",
"logs": "Logs", "logs": "Logs",
"typeerror: $matomo.trackevent is not a function": "TypeError: $matomo.trackEvent is not a function" "typeerror: $matomo.trackevent is not a function": "TypeError: $matomo.trackEvent is not a function",
"referenceerror: $matomo is not defined": "ReferenceError: $matomo is not defined"
} }

View File

@@ -166,15 +166,15 @@ const fetch = async () => {
}; };
function selectCurrency(item, id) { function selectCurrency(item, id) {
if (typeof countryCurrency.value[settingsStore.country.name] !== 'undefined') {
if (typeof countryCurrency.value[settingsStore.country.country] !== 'undefined') { settingsStore.currency = countryCurrency.value[settingsStore.country.name];
settingsStore.currency = countryCurrency.value[settingsStore.country.country];
} else { } else {
settingsStore.currency = "EUR"; settingsStore.currency = "EUR";
} }
if (settingsStore.currency != "EUR") if (settingsStore.currency != "EUR") {
settingsStore.currencyCoef = currencyHash.value[settingsStore.currency]; settingsStore.currencyCoef = currencyHash.value[settingsStore.currency];
}
else settingsStore.currencyCoef = 1.0; else settingsStore.currencyCoef = 1.0;
} }

View File

@@ -408,7 +408,7 @@ const showRow = async (item) => {
country: settingsStore.country.code, country: settingsStore.country.code,
}); });
console.log('MATOMO',$matomo); //console.log('MATOMO',$matomo);
products.value = response.data.products; products.value = response.data.products;
countryHash.value = response.data.countryHash; countryHash.value = response.data.countryHash;
console.log("TEST=", response.data); console.log("TEST=", response.data);