Problems with order confirmation emails language

  • Posts: 15
  • Thank you received: 3
3 years 2 weeks ago #336959

-- 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: 3 years 2 weeks ago by fullwater.

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

  • Posts: 82868
  • Thank you received: 13377
  • MODERATOR
3 years 2 weeks ago #336961

Hi,

I think it's a problem in the code.
In the file administrator/components/com_hikashop/classes/order.php we have this 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:
		$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.

  • Posts: 15
  • Thank you received: 3
3 years 2 weeks ago #336981

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.

  • Posts: 82868
  • Thank you received: 13377
  • MODERATOR
3 years 2 weeks ago #336988

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.

  • Posts: 15
  • Thank you received: 3
3 years 2 weeks ago #337035

Nice of you. Thank you.

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

Time to create page: 0.054 seconds
Powered by Kunena Forum