Predefined filters / dependencies

  • Posts: 9
  • Thank you received: 1
10 years 5 months ago #160548

-- HikaShop version -- : HikaShop Business 2.3.1
-- Joomla version -- : 3.3.1
-- PHP version -- : 5.5.9

Hello,

is it possible to create filters with predefined values dependent on current category?

What I am trying to do is:
I have multiple categories with subcategories. A category "tea" has subcategories (types of tea) "black", "green" and "white". If a user is currently in the main category "tea", the user should see filters "price", "name" and "type"(subcategory). But once the user enters a subcategory (e.g. "black"), he/she should only see the filters "price" and "name" AND the filter "type" should have a predefined value type=black. Now, I can create multiple hikashop filter modules for different locations (category / subcategory), but I don't know how to force all filters to search in a single category. Or the only way to do it is to create new filters "price" and "name" for each subcategory? Because there are about 30 subcategories and 5 filters...

Best regards,
Sergey

Last edit: 10 years 5 months ago by Sergus.

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
10 years 5 months ago #160680

Hi,

Why not just restrict your "type" filter to only display on the tea category and set all three price,name and type filters in your filter module ? That way, the type filter would automatically be removed on sub categories without having to create different modules.

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

  • Posts: 9
  • Thank you received: 1
10 years 5 months ago #160708

Hello Nicolas,

thank you for your reply.

I think it is what I did. I created a filter for "type" and set it to the category "tea". Then, I created two new filters for price and name. But to what category do I have to restrict these two filters? I want them to search in the subcategory which is currently open: only in "black" when I'm in subcategory "black" and only in "green" when I'm in subcategory "green".

Best regards,
Sergey

Last edit: 10 years 5 months ago by Sergus.

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
10 years 5 months ago #160839

Hi,

That should be the case, unless you turned on the "force redirect" option of the filter module (if you're using the filter module to display the filters).

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

Time to create page: 0.058 seconds
Powered by Kunena Forum