3

I'm using the Commerce module, and I'm trying to create a view that displays the nodes with several exposed filters that should apply for the products.

Now, the node has a term field that references to a category. A normal taxonomy term filter works just fine for this case.

The products has a term field that references to a color.

What I would like to do is adding another taxonomy term filter for the color vocabulary (just like the one described above) that uses a relationship to the product. AFAIK, it's not possible to use a relationship for a taxonomy term filter.

Can I achieve what I am trying, in any way?

I'm using Drupal 7.2 and Views 3-beta3.

  • Sorry, I don't understand your question. If I understand correctly, your nodes of type 'product' have two term reference fields, 'category' and 'color'. Is there any difference between those two fields, except the vocabulary they get their terms from? – marcvangend Jun 9 '11 at 10:12
  • 1
    The product is an entity created by the Commerce module. The node then has a reference field to several product entities, and a term reference to 'Category'. And then, the product entities has a term reference to 'Color'. It's the node that are displayed in the view, but I want to apply the Color filter for the product entities. Hope that makes thing a little bit clearer.. – Olof Johansson Jun 9 '11 at 11:19
  • Yes, now I understand better. Unfortunately I do not know enough about the new Commerce module to answer that question. – marcvangend Jun 9 '11 at 11:52
1

I've been able to do this with a simple "Content: Referenced product" relationship in my view. If you try using any of the "Content: xxxxx" filter fields, they won't work, as you're noting here. So, "Content: has taxonomy term ID," won't let you choose the relationship. However, if you use the "Commerce Product: xxxx" (where xxxx is the term refrerence field) field for your contextual filter, it'll work with the relationship.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.