How to add custom position in Hikashop

  • Posts: 159
  • Thank you received: 0
7 years 9 months ago #282421

Hi i want to add a cusomt mobule position in Hikashop product listing_div file. how to do that ?

i tried to add this line of module position in the file but it crashes the site and the site viewable
<?php if ($this->countModules('InnerSlider')): ?>
<jdoc:include type="modules" name="InnerSlider" style="xhtml" />
<?php endif; ?>

how to add this position in the file so the module (if assigned) will be show in the top of Product listing page only.

if i add this position in the index.php file then it works as i want. but the issue is its also showing the module on the product pages related to that category although setting of the module (mobule assignment) is limited to the selected pages only and i have only selected the page i want to show the module.

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

  • Posts: 84237
  • Thank you received: 13680
  • MODERATOR
7 years 9 months ago #282425

Hi,

You can't add template positions inside component views in Joomla.
Template positions can only be added in templates.

What you usually in these cases is either:
- like the HikaShop modules, the module itself has display options to display or not based on the current page type
- you use an extension like Advanced modules manager which can add such display option for any type of module
- you use an extension like Modules anywhere and add corresponding tag in the listing.php view file
The third option is the cheapest as the extension is free and it's not difficult to do either.

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

Time to create page: 0.053 seconds
Powered by Kunena Forum