[Skip to main content](#vessel-content)

#   Hikashop content module override

##

- **[mojweb](/forum/user/5128-mojweb "View mojweb's Profile")**
- [![mojweb's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/5128-mojweb "View mojweb's Profile") Topic Author
- [ Offline](/forum/user/5128-mojweb)

Less More

- Posts: 431
- Thank you received: 22
-

3 years 3 months ago [\#352691](#352691) by [mojweb](/forum/user/5128-mojweb "View mojweb's Profile")  *[Hikashop content module override](/forum/26-product-category-display/906598-hikashop-content-module-override#352691 "-- HikaShop version -- : 4.7.4 -- Joomla version -- : 4  I need to show some info (link) before module layout, next to module title. But this info is specific for each module. With joomla modules is easy to select custom layout in advanced tab. So you can have diferent module output.  In Hika modules there is no such option. I only can override inner layout of module. If I look at layout files, product / listing.php is the right one. If I make an module override via template override, I cant select that override in module.")* was created by *[mojweb](/forum/user/5128-mojweb "View mojweb's Profile")*

-- HikaShop version -- : 4.7.4
-- Joomla version -- : 4

I need to show some info (link) before module layout, next to module title. But this info is specific for each module.
With joomla modules is easy to select custom layout in advanced tab. So you can have diferent module output.

In Hika modules there is no such option. I only can override inner layout of module. If I look at layout files, product / listing.php is the right one.
If I make an module override via template override, I cant select that override in module.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS85MDY1OTgtaGlrYXNob3AtY29udGVudC1tb2R1bGUtb3ZlcnJpZGU/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86290
- Thank you received: 14266
-
-

3 years 3 months ago [\#352693](#352693) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Hikashop content module override](/forum/26-product-category-display/906598-hikashop-content-module-override#352693 "-- HikaShop version -- : 4.7.4 -- Joomla version -- : 4  I need to show some info (link) before module layout, next to module title. But this info is specific for each module. With joomla modules is easy to select custom layout in advanced tab. So you can have diferent module output.  In Hika modules there is no such option. I only can override inner layout of module. If I look at layout files, product / listing.php is the right one. If I make an module override via template override, I cant select that override in module.")*

Hi,

Try changing the code: Code:

name="moduleclass_sfx" type="text" label="COM_MODULES_FIELD_MODULECLASS_SFX_LABEL" /&gt;

to: Code:

&lt;field name="layout" type="modulelayout" label="JFIELD_ALT_LAYOUT_LABEL" class="form-select" description="JFIELD_ALT_MODULE_LAYOUT_DESC" validate="moduleLayout" /&gt; &lt;field name="moduleclass_sfx" type="textarea" label="COM_MODULES_FIELD_MODULECLASS_SFX_LABEL" description="COM_MODULES_FIELD_MODULECLASS_SFX_DESC" rows="3" validate="CssIdentifier" /&gt;

in the file modules/mod_hikashop/mod_hikashop.xml and it should add the setting.
Please let us know whether it works fine or not so that we can validate the change for the next release.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS85MDY1OTgtaGlrYXNob3AtY29udGVudC1tb2R1bGUtb3ZlcnJpZGU/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[mojweb](/forum/user/5128-mojweb "View mojweb's Profile")**
- [![mojweb's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/5128-mojweb "View mojweb's Profile") Topic Author
- [ Offline](/forum/user/5128-mojweb)

Less More

- Posts: 431
- Thank you received: 22
-

3 years 3 months ago -  3 years 3 months ago [\#352704](#352704) by [mojweb](/forum/user/5128-mojweb "View mojweb's Profile")  Replied by *[mojweb](/forum/user/5128-mojweb "View mojweb's Profile")* on topic *[Hikashop content module override](/forum/26-product-category-display/906598-hikashop-content-module-override#352704 "-- HikaShop version -- : 4.7.4 -- Joomla version -- : 4  I need to show some info (link) before module layout, next to module title. But this info is specific for each module. With joomla modules is easy to select custom layout in advanced tab. So you can have diferent module output.  In Hika modules there is no such option. I only can override inner layout of module. If I look at layout files, product / listing.php is the right one. If I make an module override via template override, I cant select that override in module.")*

Edit...file must be named without underline.
With added code I can see select field, but new layout can not be selected.
[ ![select&#95;2023-06-27.jpg](/forum/attachment/57249) ](/forum/attachment/57249 "...2023-06-27.jpg")

[ ![file.jpg](/forum/attachment/57248) ](/forum/attachment/57248 "file.jpg")

- [ ![file.jpg](/forum/attachment/57248) ](/forum/attachment/57248 "file.jpg") [ ](/forum/attachment/57248?download=1 "file.jpg")
- [ ![select&#95;2023-06-27.jpg](/forum/attachment/57249) ](/forum/attachment/57249 "...2023-06-27.jpg") [ ](/forum/attachment/57249?download=1 "...2023-06-27.jpg")

Last edit: 3 years 3 months ago by [mojweb](/forum/user/5128-mojweb "View mojweb's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS85MDY1OTgtaGlrYXNob3AtY29udGVudC1tb2R1bGUtb3ZlcnJpZGU/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[mojweb](/forum/user/5128-mojweb "View mojweb's Profile")**
- [![mojweb's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/5128-mojweb "View mojweb's Profile") Topic Author
- [ Offline](/forum/user/5128-mojweb)

Less More

- Posts: 431
- Thank you received: 22
-

3 years 3 months ago [\#352705](#352705) by [mojweb](/forum/user/5128-mojweb "View mojweb's Profile")  Replied by *[mojweb](/forum/user/5128-mojweb "View mojweb's Profile")* on topic *[Hikashop content module override](/forum/26-product-category-display/906598-hikashop-content-module-override#352705 "-- HikaShop version -- : 4.7.4 -- Joomla version -- : 4  I need to show some info (link) before module layout, next to module title. But this info is specific for each module. With joomla modules is easy to select custom layout in advanced tab. So you can have diferent module output.  In Hika modules there is no such option. I only can override inner layout of module. If I look at layout files, product / listing.php is the right one. If I make an module override via template override, I cant select that override in module.")*

With file name defaultnew.php I can select it, but changes are not in output.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS85MDY1OTgtaGlrYXNob3AtY29udGVudC1tb2R1bGUtb3ZlcnJpZGU/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86290
- Thank you received: 14266
-
-

3 years 3 months ago [\#352706](#352706) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Hikashop content module override](/forum/26-product-category-display/906598-hikashop-content-module-override#352706 "-- HikaShop version -- : 4.7.4 -- Joomla version -- : 4  I need to show some info (link) before module layout, next to module title. But this info is specific for each module. With joomla modules is easy to select custom layout in advanced tab. So you can have diferent module output.  In Hika modules there is no such option. I only can override inner layout of module. If I look at layout files, product / listing.php is the right one. If I make an module override via template override, I cant select that override in module.")*

Hi,

Change the line:
require(JModuleHelper::getLayoutPath('mod_hikashop'));
to:
require(JModuleHelper::getLayoutPath('mod_hikashop', $params-&gt;get('layout', 'default')));
in modules/mod_hikashop/mod_hikashop.php and it should work.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS85MDY1OTgtaGlrYXNob3AtY29udGVudC1tb2R1bGUtb3ZlcnJpZGU/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[mojweb](/forum/user/5128-mojweb "View mojweb's Profile")**
- [![mojweb's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/5128-mojweb "View mojweb's Profile") Topic Author
- [ Offline](/forum/user/5128-mojweb)

Less More

- Posts: 431
- Thank you received: 22
-

3 years 3 months ago [\#352708](#352708) by [mojweb](/forum/user/5128-mojweb "View mojweb's Profile")  Replied by *[mojweb](/forum/user/5128-mojweb "View mojweb's Profile")* on topic *[Hikashop content module override](/forum/26-product-category-display/906598-hikashop-content-module-override#352708 "-- HikaShop version -- : 4.7.4 -- Joomla version -- : 4  I need to show some info (link) before module layout, next to module title. But this info is specific for each module. With joomla modules is easy to select custom layout in advanced tab. So you can have diferent module output.  In Hika modules there is no such option. I only can override inner layout of module. If I look at layout files, product / listing.php is the right one. If I make an module override via template override, I cant select that override in module.")*

Now working. Thank you.

The following user(s) said Thank You: [nicolas](/forum/user/63-nicolas "View nicolas's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS85MDY1OTgtaGlrYXNob3AtY29udGVudC1tb2R1bGUtb3ZlcnJpZGU/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[mojweb](/forum/user/5128-mojweb "View mojweb's Profile")**
- [![mojweb's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/5128-mojweb "View mojweb's Profile") Topic Author
- [ Offline](/forum/user/5128-mojweb)

Less More

- Posts: 431
- Thank you received: 22
-

3 years 2 months ago [\#354048](#354048) by [mojweb](/forum/user/5128-mojweb "View mojweb's Profile")  Replied by *[mojweb](/forum/user/5128-mojweb "View mojweb's Profile")* on topic *[Hikashop content module override](/forum/26-product-category-display/906598-hikashop-content-module-override#354048 "-- HikaShop version -- : 4.7.4 -- Joomla version -- : 4  I need to show some info (link) before module layout, next to module title. But this info is specific for each module. With joomla modules is easy to select custom layout in advanced tab. So you can have diferent module output.  In Hika modules there is no such option. I only can override inner layout of module. If I look at layout files, product / listing.php is the right one. If I make an module override via template override, I cant select that override in module.")*

Please add to next release. Version 4.7.5 is without that.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS85MDY1OTgtaGlrYXNob3AtY29udGVudC1tb2R1bGUtb3ZlcnJpZGU/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86290
- Thank you received: 14266
-
-

3 years 2 months ago [\#354050](#354050) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Hikashop content module override](/forum/26-product-category-display/906598-hikashop-content-module-override#354050 "-- HikaShop version -- : 4.7.4 -- Joomla version -- : 4  I need to show some info (link) before module layout, next to module title. But this info is specific for each module. With joomla modules is easy to select custom layout in advanced tab. So you can have diferent module output.  In Hika modules there is no such option. I only can override inner layout of module. If I look at layout files, product / listing.php is the right one. If I make an module override via template override, I cant select that override in module.")*

Hi,

Yes, HikaShop 4.7.5 was a bug fix release.
All new improvments and new features we've been working on in the previous month, including this modification have not been added to it.
Next version, in September, will include that change.

The following user(s) said Thank You: [mojweb](/forum/user/5128-mojweb "View mojweb's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS85MDY1OTgtaGlrYXNob3AtY29udGVudC1tb2R1bGUtb3ZlcnJpZGU/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[easyconnect83](/forum/user/30833-easyconnect83 "View easyconnect83's Profile")**
- [![easyconnect83's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/30833-easyconnect83 "View easyconnect83's Profile")
- [ Offline](/forum/user/30833-easyconnect83)

Less More

- Posts: 140
- Thank you received: 21
-
-

2 years 10 months ago [\#357586](#357586) by [easyconnect83](/forum/user/30833-easyconnect83 "View easyconnect83's Profile")  Replied by *[easyconnect83](/forum/user/30833-easyconnect83 "View easyconnect83's Profile")* on topic *[Hikashop content module override](/forum/26-product-category-display/906598-hikashop-content-module-override#357586 "-- HikaShop version -- : 4.7.4 -- Joomla version -- : 4  I need to show some info (link) before module layout, next to module title. But this info is specific for each module. With joomla modules is easy to select custom layout in advanced tab. So you can have diferent module output.  In Hika modules there is no such option. I only can override inner layout of module. If I look at layout files, product / listing.php is the right one. If I make an module override via template override, I cant select that override in module.")*

Hello,

I'm joining this conservation because I'm trying to override a HikaShop module (associated products). When I create the override I get in my template folder in the html\mod_hikashop folder with the default.php file. If I rename it I can choose this override for the module in the back office but I cannot customize it. There are just a few lines of code: Code:

defined('_JEXEC') or die('Restricted access'); ?&gt;&lt;?php if(!empty($html)){ ?&gt; &lt;div id="hikashop_module_&lt;?php echo $module-&gt;id;?&gt;" class="hikashop_module &lt;?php echo (!empty($module-&gt;params) &amp;&amp; is_array($module-&gt;params) ? @$module -&gt;params['moduleclass_sfx']: ''); ?&gt;"&gt; &lt;?php echo $html; ?&gt; &lt;/div&gt; &lt;?php } ?&gt;

with the $html variable which contains the rendering of the module but I don't see how to customize it.

How should it be done?

Thanks

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS85MDY1OTgtaGlrYXNob3AtY29udGVudC1tb2R1bGUtb3ZlcnJpZGU/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86290
- Thank you received: 14266
-
-

2 years 10 months ago [\#357591](#357591) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Hikashop content module override](/forum/26-product-category-display/906598-hikashop-content-module-override#357591 "-- HikaShop version -- : 4.7.4 -- Joomla version -- : 4  I need to show some info (link) before module layout, next to module title. But this info is specific for each module. With joomla modules is easy to select custom layout in advanced tab. So you can have diferent module output.  In Hika modules there is no such option. I only can override inner layout of module. If I look at layout files, product / listing.php is the right one. If I make an module override via template override, I cant select that override in module.")*

Hi,

Customization of HikaShop modules can be done the same way you can customize the views of the main component, as explained here:
[ www.hikashop.com/support/documentation/1...-display.html#layout](https://www.hikashop.com/support/documentation/153-customize-the-display.html#layout)
So please follow the instructions there.
Note that products listing modules use the same view files as products listings menu items. So when you customize the views, if you want to affect only a particular module or menu item, you'll need to have some condition.

The following user(s) said Thank You: [easyconnect83](/forum/user/30833-easyconnect83 "View easyconnect83's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS85MDY1OTgtaGlrYXNob3AtY29udGVudC1tb2R1bGUtb3ZlcnJpZGU/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[easyconnect83](/forum/user/30833-easyconnect83 "View easyconnect83's Profile")**
- [![easyconnect83's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/30833-easyconnect83 "View easyconnect83's Profile")
- [ Offline](/forum/user/30833-easyconnect83)

Less More

- Posts: 140
- Thank you received: 21
-
-

2 years 10 months ago -  2 years 10 months ago [\#357598](#357598) by [easyconnect83](/forum/user/30833-easyconnect83 "View easyconnect83's Profile")  Replied by *[easyconnect83](/forum/user/30833-easyconnect83 "View easyconnect83's Profile")* on topic *[Hikashop content module override](/forum/26-product-category-display/906598-hikashop-content-module-override#357598 "-- HikaShop version -- : 4.7.4 -- Joomla version -- : 4  I need to show some info (link) before module layout, next to module title. But this info is specific for each module. With joomla modules is easy to select custom layout in advanced tab. So you can have diferent module output.  In Hika modules there is no such option. I only can override inner layout of module. If I look at layout files, product / listing.php is the right one. If I make an module override via template override, I cant select that override in module.")*

Thank you for the details. So I needed to make a condition in the product/listing_div.php file.

If anyone is interested, I put this code in the product / listing_div.php view
Code:

$id_mod = $this-&gt;params-&gt;get('id'); if($this-&gt;module) { $id_mod = $this-&gt;params-&gt;get('id'); }

to retrieve the id of the module called and make the condition accordingly below:

Code:

&lt;?php if ($id_mod!=124 &amp;&amp; $id_mod!=117) : ?&gt; ...

124 and 117 are the module numbers in my back office for which I want a different display.

Have a good day

Last edit: 2 years 10 months ago by [easyconnect83](/forum/user/30833-easyconnect83 "View easyconnect83's Profile").

The following user(s) said Thank You: [Philip](/forum/user/34318-philip "View Philip's Profile"), [Valserine](/forum/user/58689-valserine "View Valserine's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS85MDY1OTgtaGlrYXNob3AtY29udGVudC1tb2R1bGUtb3ZlcnJpZGU/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop- Install &amp; Update- Product &amp; Category Display- Content Creation- Sales and Orders- - Orders management- - Reports &amp; Statistics- Customers- Checkout- Payment Methods- Shipping Methods- Import &amp; Export (CSV, XLS…)- Specific Features- - Affilation- - Taxes- - Wishlist- - Vote- - Carousel &amp; Slider- - Mass Actions- - Filters &amp; Search- - Discount &amp; Coupon- - Feature Request- Integrations- Showcase- General Talk about HikaShop- Development- - HikaShop 3.0 Beta- Translation- Commercial Jobs HikaShop Components- HikaMarket- - Market: Feature requests- - Market: How to?- - Market: Bug Report- HikaSerial- - General talk about HikaSerial- - Serial: Bug Report- - Serial: How to?- - Support en Français de HikaSerial (French Support)- - HikaSubscription- HikaAuction- - Auction: Feature requests- - Auction: How to?- - Auction: Bug report Hikashop around the world- Support en Français (French Support)- Russian- - FAQ. Курс выживания с Hikashop. Частые вопросы и о- - Расширения Hikashop- - Наши сайты на Hikashop- 日本語版サポート(Japanese Support)- Thai- German Archives- Bug Report- How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.388 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)

[](#top)
