From 0bb757ababae4bcf204361591533169fcef2091b Mon Sep 17 00:00:00 2001 From: Jaroslav Drzik Date: Mon, 1 Apr 2024 19:00:57 +0200 Subject: [PATCH] Fix country and currency selection --- lang/id.json | 3 ++- resources/js/Layouts/GuestLayout.vue | 8 ++++---- resources/js/Pages/IkeaRoot.vue | 2 +- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/lang/id.json b/lang/id.json index 20823e1..9a28ea5 100644 --- a/lang/id.json +++ b/lang/id.json @@ -140,5 +140,6 @@ "doc": "Doc", "firefox 125": "Firefox 125", "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" } \ No newline at end of file diff --git a/resources/js/Layouts/GuestLayout.vue b/resources/js/Layouts/GuestLayout.vue index baa7c2e..2e26dd7 100644 --- a/resources/js/Layouts/GuestLayout.vue +++ b/resources/js/Layouts/GuestLayout.vue @@ -166,15 +166,15 @@ const fetch = async () => { }; function selectCurrency(item, id) { - - if (typeof countryCurrency.value[settingsStore.country.country] !== 'undefined') { - settingsStore.currency = countryCurrency.value[settingsStore.country.country]; + if (typeof countryCurrency.value[settingsStore.country.name] !== 'undefined') { + settingsStore.currency = countryCurrency.value[settingsStore.country.name]; } else { settingsStore.currency = "EUR"; } - if (settingsStore.currency != "EUR") + if (settingsStore.currency != "EUR") { settingsStore.currencyCoef = currencyHash.value[settingsStore.currency]; + } else settingsStore.currencyCoef = 1.0; } diff --git a/resources/js/Pages/IkeaRoot.vue b/resources/js/Pages/IkeaRoot.vue index 15bae1c..fe71958 100644 --- a/resources/js/Pages/IkeaRoot.vue +++ b/resources/js/Pages/IkeaRoot.vue @@ -408,7 +408,7 @@ const showRow = async (item) => { country: settingsStore.country.code, }); - console.log('MATOMO',$matomo); + //console.log('MATOMO',$matomo); products.value = response.data.products; countryHash.value = response.data.countryHash; console.log("TEST=", response.data);