Filter based on custom field multiple drop down

  • Posts: 100
  • Thank you received: 1
10 years 10 months ago #140994

-- HikaShop version -- : HikaShop Business: 2.2.3
-- Joomla version -- : 3.2
-- Browser(s) name and version -- : All

Hi,

I have a checkbox type filter applied on a multiple drop down type custom field and the filter result is not as expected.

The custom filed is set up like:
Label: Model
Type: multiple drop down
Values: (Value | Title)
1 | KTM
2 | Husaberg
3 | Honda
.
.
10 | Sherco
11 | Beta
12 | Montesa

The filter is set up like:
Type: Checkbox
Dynamic Display: Yes
Apply on: Custom Fields
Custom fields: Model

The products are set up like
Product 1 - Model = KTM
Product 2 - Model = Husaberg
Product 3 - Model = Honda
Product 4 - Model = Sherco
Product 5 - Model = Beta
Product 6 - Model = Montesa

I am using the Filter module, when I select KTM on the filter module the result should be:
Product 1
but the result is:
Product 1
Product 4
Product 5
Product 6

Its seems because the value of the custom field KTM is 1 and the values for the custom fields Sherco, Beta, Montesa contain 1 they are being displayed as results.

I have attached a 2 screenshots of the settings for the custom field and filter

Is this a bug? or have i got it configured incorrectly?

Thanks
Alex

Attachments:
Last edit: 10 years 10 months ago by reders.

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

  • Posts: 12953
  • Thank you received: 1778
10 years 10 months ago #141068

Hi,
Can you go to 6 product configuration pages, set their "model" value, and save at least one time and test it again ?

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

  • Posts: 100
  • Thank you received: 1
10 years 10 months ago #141088

Hi,

Thank you for your reply.

The model value is set for every product, please see screenshot attached.

Thank you

Attachments:

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

  • Posts: 100
  • Thank you received: 1
10 years 10 months ago #141097

The URL to the page with the error is: www.red-ferndevelopment.co.uk/RaptorTita...t=listing&Itemid=316

I can PM administrator and FTP access if needed

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
10 years 9 months ago #141161

Hi,

I just did a test on your website and it seems to work fine. When I select "KTM" on that page I see two products instead of the 12 products I saw before.
If you're talking about the fact that you see a sherco product when you shouldn't, that's because you set the value 10 for that custom field option and that the KTM one has a value of 1 ans as you know the text "1" is one the text "10".

You should should avoid numbers for your values or use non overlapping ones.

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

  • Posts: 100
  • Thank you received: 1
10 years 9 months ago #141162

Hi Nicolas,

The only product that is tagged under KTM is RX001 Xtreme footpegs KTM.

The other product RX013 Xtreme footpegs Sherco is under the tag Sherco.

However the value of the tag KTM is 1.
The value of the tag Sherco is 10.

If I tag a product as Beta, which the value is 11.

This will also show as a result when I select KTM.

Thank you
Alex

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

  • Posts: 100
  • Thank you received: 1
10 years 9 months ago #141163

Apologies I replied a little hastily and didn't read the second half of your reply.

Is there no way to make it filter by unique value? For example on different site we developing using hikashop I set up two filters with the values:
invertedtriangle
triangle

and these conflicted with each other, if I selected triangle I would see all the prodcut tagged and triangle and invertedtriangle

Thanks
Alex

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
10 years 9 months ago #141246

There is always a way by modifying the code. But for our purpose, so that it works in all the cases, we need to leave it like that (otherwise, it wouldn't work for multiple selects and checkboxes custom fields.

The best it to always use different values for your custom fields. They don't display on the website anyway, so that shouldn't be a problem.

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

  • Posts: 100
  • Thank you received: 1
10 years 9 months ago #142099

Hi Nicolas,

I can use different values, but for example there are bike models TM and KTM so that means I cant use the model as the value as these conflict with each other.

The only convention I can think of using for the value that will guarantee not to conflict is using letters a-z, but what happens if I have more that 26 options?

Alex

Last edit: 10 years 9 months ago by reders.

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
10 years 9 months ago #142700

you can simply use a more complex convention.
For example:
0001
0002
0003
...etc...
9999

If you use the same number of characters, you won't have the issue of having another value matching because of another smaller one.

The following user(s) said Thank You: reders

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

Time to create page: 0.075 seconds
Powered by Kunena Forum