Hi,
Looks like the function "loadAllWithTrans" is using the User default language stored in his profile.
So in the HikaShop category class you can replace:
$user = JFactory::getUser();
$locale = $user->getParam('language');
if(empty($locale)){
$config = JFactory::getConfig();
if(!HIKASHOP_J16){
$locale = $config->getValue('config.language');
} else {
$locale = $config->get('language');
if($locale === null)
$locale = $config->get('config.language');
}
}
By
if(empty($locale)) {
$user = JFactory::getUser();
$locale = $user->getParam('language');
}
if(empty($locale)){
$config = JFactory::getConfig();
if(!HIKASHOP_J16){
$locale = $config->getValue('config.language');
} else {
$locale = $config->get('language');
if($locale === null)
$locale = $config->get('config.language');
}
}
And change the definition of the function to add a new parameter
function loadAllWithTrans($type = '', $all = false, $filters = array(), $order = ' ORDER BY category_ordering ASC', $start = 0, $value = 500, $category_image = false, $locale = null) {
The, in HikaMarket, you have to give the current locale to the function
$rows = $categoryClass->loadAllWithTrans('status', false, $filters);
By
$locale = null;
$app = JFactory::getApplication();
if(!$app->isAdmin()) {
$lang = JFactory::getLanguage();
$locale = $lang->getTag();
}
$rows = $categoryClass->loadAllWithTrans('status', false, $filters, ' ORDER BY category_ordering ASC', 0, 500, false, $locale);
And it should logically fix the issue.
Regards,