when is the language of the order set

  • Posts: 290
  • Thank you received: 22
6 months 1 week 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: 81568
  • Thank you received: 13078
  • MODERATOR
6 months 6 days 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.057 seconds
Powered by Kunena Forum