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

#   Predefined filters / dependencies

##

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

Less More

- Posts: 9
- Thank you received: 1
-
-

12 years 5 months ago -  12 years 5 months ago [\#160548](#160548) by [Sergus](/forum/user/32549-sergus "View Sergus's Profile")  *[Predefined filters / dependencies](/forum/45-filters-search/869059-predefined-filters-dependencies#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 &quot;tea&quot; has subcategories (types of tea) &quot;black&quot;, &quot;green&quot; and &quot;white&quot;. If a user is currently in the main category &quot;tea&quot;, the user should see filters &quot;price&quot;, &quot;name&quot; and &quot;type&quot;(subcategory). But once the user enters a subcategory (e.g. &quot;black&quot;), he/she should only see the filters &quot;price&quot; and &quot;name&quot; AND the filter &quot;type&quot; 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 &quot;price&quot; and &quot;name&quot; for each subcategory? Because there are about 30 subcategories and 5 filters...  Best regards, Sergey")* was created by *[Sergus](/forum/user/32549-sergus "View Sergus's Profile")*

-- 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: 12 years 5 months ago by [Sergus](/forum/user/32549-sergus "View Sergus's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQ1LWZpbHRlcnMtc2VhcmNoLzg2OTA1OS1wcmVkZWZpbmVkLWZpbHRlcnMtZGVwZW5kZW5jaWVzP3RtcGw9bWFya2Rvd24=) 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?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86576
- Thank you received: 14320
-
-

12 years 5 months ago [\#160680](#160680) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Predefined filters / dependencies](/forum/45-filters-search/869059-predefined-filters-dependencies#160680 "-- 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 &quot;tea&quot; has subcategories (types of tea) &quot;black&quot;, &quot;green&quot; and &quot;white&quot;. If a user is currently in the main category &quot;tea&quot;, the user should see filters &quot;price&quot;, &quot;name&quot; and &quot;type&quot;(subcategory). But once the user enters a subcategory (e.g. &quot;black&quot;), he/she should only see the filters &quot;price&quot; and &quot;name&quot; AND the filter &quot;type&quot; 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 &quot;price&quot; and &quot;name&quot; for each subcategory? Because there are about 30 subcategories and 5 filters...  Best regards, Sergey")*

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](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQ1LWZpbHRlcnMtc2VhcmNoLzg2OTA1OS1wcmVkZWZpbmVkLWZpbHRlcnMtZGVwZW5kZW5jaWVzP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

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

Less More

- Posts: 9
- Thank you received: 1
-
-

12 years 5 months ago -  12 years 5 months ago [\#160708](#160708) by [Sergus](/forum/user/32549-sergus "View Sergus's Profile")  Replied by *[Sergus](/forum/user/32549-sergus "View Sergus's Profile")* on topic *[Predefined filters / dependencies](/forum/45-filters-search/869059-predefined-filters-dependencies#160708 "-- 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 &quot;tea&quot; has subcategories (types of tea) &quot;black&quot;, &quot;green&quot; and &quot;white&quot;. If a user is currently in the main category &quot;tea&quot;, the user should see filters &quot;price&quot;, &quot;name&quot; and &quot;type&quot;(subcategory). But once the user enters a subcategory (e.g. &quot;black&quot;), he/she should only see the filters &quot;price&quot; and &quot;name&quot; AND the filter &quot;type&quot; 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 &quot;price&quot; and &quot;name&quot; for each subcategory? Because there are about 30 subcategories and 5 filters...  Best regards, Sergey")*

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: 12 years 5 months ago by [Sergus](/forum/user/32549-sergus "View Sergus's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQ1LWZpbHRlcnMtc2VhcmNoLzg2OTA1OS1wcmVkZWZpbmVkLWZpbHRlcnMtZGVwZW5kZW5jaWVzP3RtcGw9bWFya2Rvd24=) 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?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86576
- Thank you received: 14320
-
-

12 years 5 months ago [\#160839](#160839) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Predefined filters / dependencies](/forum/45-filters-search/869059-predefined-filters-dependencies#160839 "-- 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 &quot;tea&quot; has subcategories (types of tea) &quot;black&quot;, &quot;green&quot; and &quot;white&quot;. If a user is currently in the main category &quot;tea&quot;, the user should see filters &quot;price&quot;, &quot;name&quot; and &quot;type&quot;(subcategory). But once the user enters a subcategory (e.g. &quot;black&quot;), he/she should only see the filters &quot;price&quot; and &quot;name&quot; AND the filter &quot;type&quot; 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 &quot;price&quot; and &quot;name&quot; for each subcategory? Because there are about 30 subcategories and 5 filters...  Best regards, Sergey")*

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](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQ1LWZpbHRlcnMtc2VhcmNoLzg2OTA1OS1wcmVkZWZpbmVkLWZpbHRlcnMtZGVwZW5kZW5jaWVzP3RtcGw9bWFya2Rvd24=) 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.052 seconds

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