Hi,

i found some similary issues, but they are not exaktly the same then mine.
I use the Selective Exposed Filter on two CCK Taxonomyfield. There are multiply terms allowed for those fields.

For Example I have products and in the first cck field I define all colours of the product, and in the second field i define all materials.

Product X: Vocabular 1 Terms | Vocabulary 2 Terms
Product 1: red, blue, orange | wood, glas
Product 2: green, red | metal, wood
Product 3: orange, blue | plastic, metal

In my view i want to filter for colors and for the material.
So now if i filter for "red", the second filter options should be filtert to "wood", "glas", "metal"
Or i filter for "green", the second filter options should be filtert to "metal", "wood"
Or i filter for "plastic", the first filter options should be filtert to "orange", "blue"

So this all works correctly, but i want to use these filters as "Is all of". so if i filter for "red" i dont want that all other colors filter options are invisible. Because the products with "red" also contain "blue", "orange" and "green" so i want to see these options after filtering for red. because i also want to be able to filter for "red" AND "blue", and then i only want to see all Products with red and blue, so in this example only "Product 1".

Is there a way to do this?

Comments

willhowlett’s picture

Sorry to wade in on such an old topic. I required the 'is all of' operator for my usage. I found that editing views_hacks\views_filters_selective\views_handler_filter_selective.inc and changing line 3 from:

class views_handler_filter_selective extends views_handler_filter_in_operator {

to:

class views_handler_filter_selective extends views_handler_filter_many_to_one {

allowed me to use the 'all of' operator successfully (haven't run into any problems yet, will post back if I do).
Note, once you've made this change the operator option within your exposed filter will have been unselected and you'll need to set it again otherwise you will get validation errors.

Note: This is using the Drupal 7 version of the module, I have not tried this in Drupal 6

aze2010’s picture

Hi Willhowlett,

thanks for sharing your expirence.

When i do it like you said above i got errors in apache log and a white page.

Error-Massage: Class 'views_handler_filter_many_to_one' not found in ... views_hacks/views_filters_selective/views_handler_filter_selective.inc on line 3

Iam using Views3 (latest Dev) and Drupal 6.26.

Can you give me a hint?

Thanks in advanced

Alex

willhowlett’s picture

Apologies, I hadn't spotted that this was for the D6 version of the module. I'm using D7.

That said, the many to one handler does exist in D6, so I'm not sure why it's not getting recognised
http://api.drupal.org/api/views/handlers!views_handler_filter_many_to_on...

aze2010’s picture

Hi willhowlett,

thanks for responding.

I dont know why it does not recognize. I will have a review on that.

I'll report the next days.

Regards
Alex

khalor’s picture

willhowlett's fix in #1 fixes the issue for me

aze2010’s picture

Hi Khalor,

which versions do you use? Drupal, Views and Views hacks ?

Greetings
Alex

khalor’s picture

Drupal 7.16, Views 7.x-3.5, current dev of Views Hacks (7.x-1.0-alpha1+6-dev (2012-Aug-17)) with this unrelated patch for displaying term names instead of IDs.

aze2010’s picture

Ahh okay. Thanks for this Info.
Iam using Drupal 6 mit latest Views3-dev and latest Views Hacks dev-version.

Greetings and have a nice day.

oliverpolden’s picture

@willhowlett I tried what you suggested in Drupal 7 but I still don't see the 'all of' operator. Is there anything else you did?

willhowlett’s picture

Have you tried flushing your site's cache? That's the only thing I can think of I'm afraid.

infojunkie’s picture

Issue summary: View changes
Status: Active » Closed (won't fix)

This module is no longer maintained for D6 and has been deprecated in favour of https://drupal.org/project/views_selective_filters for D7. Please test there and reopen if necessary.