From 031a27b60f10b4badafb7dcf9558dbb92caa6bcb Mon Sep 17 00:00:00 2001 From: Clara <76918665+ClaraLpresta@users.noreply.github.com> Date: Tue, 22 Oct 2024 14:20:19 +0200 Subject: [PATCH] fix 404 help center (#1835) --- _dev/apps/ui/src/assets/json/prestashopUrl.json | 7 ++++++- _dev/apps/ui/src/store/modules/app/getters.ts | 3 ++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/_dev/apps/ui/src/assets/json/prestashopUrl.json b/_dev/apps/ui/src/assets/json/prestashopUrl.json index 7a38c37e85..568241b712 100644 --- a/_dev/apps/ui/src/assets/json/prestashopUrl.json +++ b/_dev/apps/ui/src/assets/json/prestashopUrl.json @@ -1,3 +1,8 @@ { - "contactForm": "https://help-center.prestashop.com/contact" + "contactForm": { + "en": "https://prestashop-academy.com/gb/contact-us", + "fr": "https://prestashop-academy.com/fr/nous-contacter", + "it": "https://prestashop-academy.com/it/contattaci", + "es": "https://prestashop-academy.com/es/contactenos" + } } \ No newline at end of file diff --git a/_dev/apps/ui/src/store/modules/app/getters.ts b/_dev/apps/ui/src/store/modules/app/getters.ts index 6eb3587f4b..5129850a99 100644 --- a/_dev/apps/ui/src/store/modules/app/getters.ts +++ b/_dev/apps/ui/src/store/modules/app/getters.ts @@ -43,8 +43,9 @@ export default { state: LocalState, getters, rootState, rootGetters, ): string { const {domain} = rootGetters['accounts/GET_PS_ACCOUNTS_CONTEXT'].currentShop; + const languageCode = rootGetters[`app/${GettersTypes.GET_CURRENT_LANGUAGE}`]; - return `${prestashopUrls.contactForm}?utm_source=back-office&utm_medium=psx&psx=psxmarketingwithgoogle&shop_domain=${domain}`; + return `${prestashopUrls.contactForm[languageCode] ?? prestashopUrls.contactForm.en}?utm_source=back-office&utm_medium=psx&psx=psxmarketingwithgoogle&shop_domain=${domain}`; }, [GettersTypes.GET_DEBUG_DATA](state: LocalState): DebugData { return state.debugData;