when is the language of the order set

  • Posts: 290
  • Thank you received: 22
1 year 2 months ago #356191

-- HikaShop version -- : 5.0.0
-- Joomla version -- : 4.4.0
-- PHP version -- : 8.2

Hi,

I'm wondering where the language of the order is set?
If I'm correct it defaults to English.
If this is the case, why not to the default language of the site when ordering as guest?
Just trying to figure out stuff so not complaining :-)

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

  • Posts: 83024
  • Thank you received: 13403
  • MODERATOR
1 year 2 months ago #356194

Hi,

The language of the order is stored in the "order_lang" column of the hikashop_order.
This is set in the save function of the order class ( in the file administrator/components/com_hikashop/classes/order.php ) when the order is being created, using the current language of the website. It uses this code:

		if($new && empty($order->order_lang)) {
			$lang = JFactory::getLanguage();
			$order->order_lang = $lang->getTag();
		}
So no, it doesn't default to English as far as I know.

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

Time to create page: 0.063 seconds
Powered by Kunena Forum