Apply a filter by State only

  • Posts: 21
  • Thank you received: 0
8 years 6 months ago #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 "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 or Create an account to join the conversation.

  • Posts: 82867
  • Thank you received: 13374
  • MODERATOR
8 years 6 months ago #240041

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 or Create an account to join the conversation.

  • Posts: 21
  • Thank you received: 0
8 years 6 months ago #240096

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

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

Time to create page: 0.061 seconds
Powered by Kunena Forum