Skip to main content

Module in product view

More
3 years 9 months ago #347463 by verzevoul
-- HikaShop version -- : 4.7.0
-- Joomla version -- : 3.10.11

Hello,

I edited the show_default.php file to add a module at the right part of the product, the problem is that i have a 2 language website so i set the language of the module to Greek or English but it still appears in both languages.
Any ideas how to fix this?

Thank you

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

More
3 years 9 months ago #347466 by nicolas
Replied by nicolas on topic Module in product view
Hi,

What code did you use to add the module ? Without knowing your code, I can't say what you did wrong.
I would personnally do it like that:
Code:
<?php $moduleHelper = hikashop_get('helper.module'); $modules = $moduleHelper->setModuleData(array(XX, YY, ZZ)); if(!empty ($modules) && is_array($modules)) { jimport('joomla.application.module.helper'); foreach($modules as $module) { echo JModuleHelper::renderModule($module); } } ?>
where XX, YY and ZZ are ids of the modules (one for each language). The setModuleData would automatically filter out the modules based on the current language and the associated language in each module and then the renderModule function would display the remaining modules.
That's similar code we use for the "Modules under the product page" setting of the HikaShop configuration.
The following user(s) said Thank You: verzevoul

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

Time to create page: 0.170 seconds
Powered by Kunena Forum