Skip to main content

Problems with order confirmation emails language

More
4 years 10 months ago - 4 years 10 months ago #336959 by fullwater
-- HikaShop version -- : 4.4.4
-- Joomla version -- : 3.10.3
-- PHP version -- : 7.4.24

Hello,
i have a website in italian and english where italian is the default language.
The link in the order confirmation mail sent to the users, points to the english version of the site even if the order was placed in Italian.
What am i missing?
Thank in advance
Last edit: 4 years 10 months ago by fullwater.

Please Log in or Create an account to join the conversation.

More
4 years 10 months ago #336961 by nicolas
Hi,

I think it's a problem in the code.
In the file administrator/components/com_hikashop/classes/order.php we have this code:
Code:
$order->order_url = hikashop_contentLink('order&task=show&cid[]='.$order->order_id.$url, $order, false, false, false, true); $app = JFactory::getApplication(); $locale = $this->loadLocale($order);
The call to the loadLocale function is what properly sets the current language to the language of the customer. But it is placed after the line setting $order->order_url which contains the URL of the order.
So I think this code should be changed to swap both lines, like this:
Code:
$locale = $this->loadLocale($order); $order->order_url = hikashop_contentLink('order&task=show&cid[]='.$order->order_id.$url, $order, false, false, false, true); $app = JFactory::getApplication();
It should then generate a link with the correct language.
The following user(s) said Thank You: fullwater

Please Log in or Create an account to join the conversation.

More
4 years 10 months ago #336981 by fullwater
Hi Nicolas, it works, thank You.
Are you planning to fix the code on next release or i'll have to change manually those lines on every single update?

Please Log in or Create an account to join the conversation.

More
4 years 10 months ago #336988 by nicolas
Hi,

The modification is added on our end for the next version of HikaShop, so no worries.
The following user(s) said Thank You: fullwater

Please Log in or Create an account to join the conversation.

More
4 years 10 months ago #337035 by fullwater
Nice of you. Thank you.

Please Log in or Create an account to join the conversation.

Time to create page: 0.230 seconds
Powered by Kunena Forum