Filters for use on custom fields in product table

  • Posts: 55
  • Thank you received: 1
12 years 4 months ago #87672

Hi,

I'm trying to set up some filters that should display values from a custom field in the product table and I'm running into some strange behaviour and confusing information. After working through the documentation I thought I had everything set up correctly, but no values where show in the filters (just 'All'). Then I discovered that when I change the Category in the filter to something else then the root category (the one I had selected, including sub categories), an error message pops up saying the Custom field I had chosen is not available for this category).

So, what I don't get is, if all my product have this custom fields, why wouldn't it be available in a certain category (and why DOES it seem to be available in the root category, where no error shows up)?

And am I doing this the right way if I want to use values from a product custom field in a filter? Or is the filter just for category custom fields?

I'm using Hikashop Business 2.0.0

Really could use some help on this...

Thanks

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

  • Posts: 83993
  • Thank you received: 13605
  • MODERATOR
12 years 4 months ago #87881

Hi,

You simply don't need to setup a category in your filter.
The category option in filters allow you to restrict the display of the filter to only some categories. If you want to display the filter regardless of the current category, simply leave that field empty.

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

  • Posts: 55
  • Thank you received: 1
12 years 4 months ago #87895

Thanks for your help!

Actually I tried to do so, but when I don't select a category, the 'Custom Fields' dropdown goes empty and does not show any Custom Fields. I just discovered by accedent that it DOES show my custom fields however, when I enable the 'Including sub categories' option, which is a bit strange I think. Selecting 'No category'(or 0), Including sub categories?

Anyhow, I tried both ways and there's still no values in the filters...

I tried:
Create a Categories Listing Menu item, configure its related product listing module (not the Hikashop 'content menu' item) to show 'all sub elements'. Create a Hikashop Filter Module and configured its 'Menu' option to be the id of the Categories Listing item.
But to no avail... The Module nor the normal filters module show any values for the three filters I configured and I do have values in my custom fields. They show perfectly fine in he backend Form.

I also tried publishing all related modules and items (just in case), setting the Menu option in the related product listing module, setting the Hikashop Content Menu options to 'all sub elements' and 'all sub categories'. Tested the filters in the main category window and inside a category.
But no go...

I have really tried many many combinations of settings, started from scratch a few times following the instructions in the 'Filter listing' documentation, but cannot seem to get this to work.

Any further insights would be appreciated! :)

Thanks again!

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

  • Posts: 55
  • Thank you received: 1
12 years 4 months ago #87901

Update on the last post:

I had set up my custom fields to show on de main category (Product Category in root) with the option 'Including sub categories' enabled (not knowing this isn't necessary to make a field available for all categories). I just removed everything, and now I CAN disable the 'Include sub categories' option in my filter, without losing the 'Custom Fields' as mentioned earlier. So this part is cleared up, although it might be considered a small bug I guess.

Anyhow... Still no values in my filters... :(

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

  • Posts: 83993
  • Thank you received: 13605
  • MODERATOR
12 years 4 months ago #88175

If you don't have any values in the filter dropdown, it's probably that you have turned on the "dynamic filter" option of your filter.
Because of that, it will only display the values of the products which are displayed on the result listing of the page. So if you have no products, or if you haven't saved any product with your custom field selected, there will be no values to display the filter.

If that doesn't come from that, please post a screenshot of both your filter and your field and a link to the page so that we can see what you did.

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

  • Posts: 55
  • Thank you received: 1
12 years 4 months ago #90636

Hi again, sorry for the delay.

The dynamic filter option is turned off...

I noticed that the only way I can get the filters to work is when I set the filter type to 'Text'. When I do so, and I put a name in the filter field, the result actually shows only the products with the value I set. But when I choose Single Dropdown, there's no values in the filter. Just 'All'...

The attachments show how I set up the filter(s) and the field(s)

And here's a link to a category on the site: www.cyclexperience.nl/categorie/250-binnenbanden

Thanks!

Attachments:

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

  • Posts: 83993
  • Thank you received: 13605
  • MODERATOR
12 years 4 months ago #91011

Hi,

You need to use a custom field of the type "dropdown" or "checkbox" or "radio" or "multiple dropdown".
The filter directly takes its values from the field values. If you don't have any values in the field, which is the case for a field of the type text, you won't get any value in the filter.

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

  • Posts: 55
  • Thank you received: 1
12 years 4 months ago #91016

Hi,

So if I understand correctly, you are saying that the values have to be defined in the field settings and that these settings are used to fill the filters? I actually thought that the filter would be able to read the values we put in the database using a CSV import and show them as options in the filter list. Kind of like the autofilter function in Excel...

Well, if that's not the way it works... Now at least I know what to change to make it work. We'll have to change the script that generates the import csv and I need to create the values I want to look for using the parameters in the fields setup screen... :)

Thanks for explaining! I had no idea...
MF

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

Time to create page: 0.101 seconds
Powered by Kunena Forum