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

#   Apply a filter by State only

##

- **[3bits](/forum/user/7810-3bits "View 3bits's Profile")**
- [![3bits's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar7810.png)](/forum/user/7810-3bits "View 3bits's Profile") Topic Author
- [ Offline](/forum/user/7810-3bits)

Less More

- Posts: 21
- Thank you received: 0
-
- [](http://3-bits.com)
-

10 years 6 months ago [\#240030](#240030) by [3bits](/forum/user/7810-3bits "View 3bits's Profile")  *[Apply a filter by State only](/forum/45-filters-search/884490-apply-a-filter-by-state-only#240030 "-- HikaShop version -- : 2.6.2 -- Joomla version -- : 3.5.1 -- PHP version -- : 5.6.21 -- Browser(s) name and version -- : FF 44.0.2.  I'm trying to set a filter based in the States field used in Hikashop.  First, I created a custom field for the product called State. The field type is Zone, and then Zone set to States. After Save, the default field displayed is &quot;Please select a country first&quot; (the same is displayed in the Preview) and I don't see any Country to select.  I unpublished all the countries except one (USA) so I don't want to filter by country (because only one), just the State.  I created the filter and linked the Simple Dropdown type to a custom field (state) but the filter only has one item: &quot;all&quot;  So not sure if I'm doing something wrong. Any help will bbe appreciated.  Thanks in advance")* was created by *[3bits](/forum/user/7810-3bits "View 3bits's Profile")*

-- HikaShop version -- : 2.6.2
-- Joomla version -- : 3.5.1
-- PHP version -- : 5.6.21
-- Browser(s) name and version -- : FF 44.0.2.

I'm trying to set a filter based in the States field used in Hikashop.

First, I created a custom field for the product called State. The field type is Zone, and then Zone set to States. After Save, the default field displayed is "Please select a country first" (the same is displayed in the Preview) and I don't see any Country to select.

I unpublished all the countries except one (USA) so I don't want to filter by country (because only one), just the State.

I created the filter and linked the Simple Dropdown type to a custom field (state) but the filter only has one item: "all"

So not sure if I'm doing something wrong. Any help will bbe appreciated.

Thanks in advance

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQ1LWZpbHRlcnMtc2VhcmNoLzg4NDQ5MC1hcHBseS1hLWZpbHRlci1ieS1zdGF0ZS1vbmx5P3RtcGw9bWFya2Rvd24=) 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: 86556
- Thank you received: 14305
-
-

10 years 6 months ago [\#240041](#240041) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Apply a filter by State only](/forum/45-filters-search/884490-apply-a-filter-by-state-only#240041 "-- HikaShop version -- : 2.6.2 -- Joomla version -- : 3.5.1 -- PHP version -- : 5.6.21 -- Browser(s) name and version -- : FF 44.0.2.  I'm trying to set a filter based in the States field used in Hikashop.  First, I created a custom field for the product called State. The field type is Zone, and then Zone set to States. After Save, the default field displayed is &quot;Please select a country first&quot; (the same is displayed in the Preview) and I don't see any Country to select.  I unpublished all the countries except one (USA) so I don't want to filter by country (because only one), just the State.  I created the filter and linked the Simple Dropdown type to a custom field (state) but the filter only has one item: &quot;all&quot;  So not sure if I'm doing something wrong. Any help will bbe appreciated.  Thanks in advance")*

Hi,

The fact that the field is empty in the product edition, is probably because you need to have a country custom field for it to know the default country value to base itself on for loading the states of that country.

But anyways, the filtering system doesn't support custom fields of the type "zone" so it won't work.

I would recommend instead of create a standard "single dropdown" custom field and enter the states in the values of the custom field. It will then work properly both for the field in the product and in the filter based on that field.

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

- **[3bits](/forum/user/7810-3bits "View 3bits's Profile")**
- [![3bits's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar7810.png)](/forum/user/7810-3bits "View 3bits's Profile") Topic Author
- [ Offline](/forum/user/7810-3bits)

Less More

- Posts: 21
- Thank you received: 0
-
- [](http://3-bits.com)
-

10 years 6 months ago [\#240096](#240096) by [3bits](/forum/user/7810-3bits "View 3bits's Profile")  Replied by *[3bits](/forum/user/7810-3bits "View 3bits's Profile")* on topic *[Apply a filter by State only](/forum/45-filters-search/884490-apply-a-filter-by-state-only#240096 "-- HikaShop version -- : 2.6.2 -- Joomla version -- : 3.5.1 -- PHP version -- : 5.6.21 -- Browser(s) name and version -- : FF 44.0.2.  I'm trying to set a filter based in the States field used in Hikashop.  First, I created a custom field for the product called State. The field type is Zone, and then Zone set to States. After Save, the default field displayed is &quot;Please select a country first&quot; (the same is displayed in the Preview) and I don't see any Country to select.  I unpublished all the countries except one (USA) so I don't want to filter by country (because only one), just the State.  I created the filter and linked the Simple Dropdown type to a custom field (state) but the filter only has one item: &quot;all&quot;  So not sure if I'm doing something wrong. Any help will bbe appreciated.  Thanks in advance")*

Thank you Nicolas. I will try to do it in the way suggested

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQ1LWZpbHRlcnMtc2VhcmNoLzg4NDQ5MC1hcHBseS1hLWZpbHRlci1ieS1zdGF0ZS1vbmx5P3RtcGw9bWFya2Rvd24=) 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.061 seconds

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