Filters in products page

  • Posts: 21
  • Thank you received: 1
9 years 5 months ago #179901

-- HikaShop version -- : 2.3.4
-- Joomla version -- : 3.3.6
-- PHP version -- : 5.5.6
-- Browser(s) name and version -- : Firefox Developers Edition 35.0a2

I have several filters in a module that is set to display in a page menu that is a product listing. This is working fine, just as I want to.

The problem is that when I click in one of the products of the listing the module with the filter is still displayed and it shouldn't. There's no point in having a filter in a product page. How can I make it not be displayed in the products page?

Thank you.

Best regards

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

  • Posts: 81539
  • Thank you received: 13069
  • MODERATOR
9 years 5 months ago #179916

Hi,

You can use a module manager extension like advanced modules manager in order to have more fine grained control on which page to display your modules. That will allow you to tell joomla to display the module on the listing but not the details page.

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

  • Posts: 21
  • Thank you received: 1
9 years 5 months ago #180030

Hi Nicolas,

Thank you for your answer. I'll try your suggestion and will give you more feedback.

Best regards

Last edit: 9 years 5 months ago by EnduranceCode.

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

  • Posts: 21
  • Thank you received: 1
9 years 4 months ago #181388

Hi Nicolas,

I've installed Advanced Module Manager Free and I wasn't able to make it work. I've tried all the options that I could think of and it never worked for me. Or I didn't have the module displayed or it was displayed also in the product page.

Can you put me in the right direction or do I have to buy the pro version?

Thank you.

Best regards.

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

  • Posts: 12953
  • Thank you received: 1778
9 years 4 months ago #181455

Hello,
You'll have more information about the difference between their free/pro version by checking that page : www.nonumber.nl/extensions/advancedmodulemanager
Tut the best solution will be to directly ask them.

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

  • Posts: 2143
  • Thank you received: 747
9 years 4 months ago #181465

In addition to what Nicolas and Mohamed are indicating, and as required for this particular request, I can confirm that NoNumber's AMM Pro lets you configure modules for exclusion from HikaShop product pages. So, the Pro version will do the job, while the free one will not.


Need help with customisations of layouts, style or other site development? PM me!
(Don't forget to turn on "E-mail notification of new messages" )

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

  • Posts: 21
  • Thank you received: 1
9 years 4 months ago #181508

Hi,

I wasn't happy to have to pay to enable this feature, therefore I've investigated a little further and I've found a solution with a little hack in my template. Here it is, in case someone needs it:

<?php 
	$typeView = JRequest::getVar('task','listing');
	if ($typeView != 'show') {
?>
	<jdoc:include type="modules" name="filters-position"/>
<?php
	}
?>

With this code in the template, if the page is a product page, the template's position isn't published and therefore all the modules assigned to that position aren't published.

I'm still learning Joomla programing and PHP and therefore I don't Know exactly the full implication of this hack, but for now, I know it works: No filter is published in a product page. I only have to be carefully to use only this position to publish Hikashop filter modules.

But I firmly believe that this should be a Hikashop core feature, I can't see absolute no reason to have a filter in a product page.

I hope that the Hikashop team can consider this problem.

Best regards.

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

  • Posts: 21
  • Thank you received: 1
9 years 4 months ago #181829

Hi,

It's true that my problem seems to be solved but I would like to get some feedback from the HikaShop concerning the way I've solved the problem.

I would like to know if there is a way to use this kind of solution/hack within HikaShop instead of within the template configuration.

I understand that JRequest::getVar() is a Joomla "fuction" that gets Joomla's variables and I would like to know if there is any Hikashop function and/or variable to achieve similar results.

Finally, I wouls also like to know if the Hikashop is planing to introduce a way stop filters display in product's pages.

Thank you.

Best regards

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

  • Posts: 26004
  • Thank you received: 4004
  • MODERATOR
9 years 4 months ago #181915

Hi,

If you look at the content of the view "product | show", you will see near the end some code to display the modules.
The displayed modules are coming from the HikaShop setting "modules under the product page".

echo JModuleHelper::renderModule($module);

Because the HikaShop views are written in PHP, you can use an override in the product page (like "product | show_default") in order to display manually the module you want, where you want.
You can also use the other "tricks" like "loadposition", but you will have to display it using
JHTML::_('content.prepare', '{loadposition...}');
in order to let the content plugin process the content.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

  • Posts: 17
  • Thank you received: 1
9 years 1 month ago #194101

I want to get rid of the filter module on the product detail page, too.

I don´t want to use (buy) a Module Manager, I just want to comment out (or delete) the php code in the products detail page. Deleting a module position doesn´t work for me, since I have other modules on this position, too. I want to comment out the php call for the filter itself.

How can I afford that? - Thanks!

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

  • Posts: 13201
  • Thank you received: 2322
Time to create page: 0.119 seconds
Powered by Kunena Forum