Creating a view containing products from multiple product displays

Hello all, sorry if this is a simple question, I am fairly new to drupal :). I've been burning a lot of time on this however, so any help is truly appreciated.

When displaying a product display, I have the need to access thumbnails from both products attached to that product display, as well as products that are marked as related in some way and are attached to a separate product display.

My setup at this point uses taxonomy, along with a term reference on the product display. Essentially all product displays that should share thumbnails within products have the same term reference. In that way I assumed I would be able to use a view, and in pseduo sql "select thumbnails from product where product.product_display is in (select all product displays where product_display.term is this.product_display.term)"

My problem is that I am not very accustomed to the views interface, and it seems difficult to manage this through the morass of checkboxes. One solution I have come up with is to pass the term reference through a url, then run a selection based of that using a contextual filter on product displays. While this works, its not very clean, and requires additional fields on the url I'd rather not generate everywhere else in the app.

Is there a better way of handling this?

Posted: Nov 18, 2011


rfay Randy Fay on November 18, 2011

Views relationships are what you want. You'll find information about how to use them many places. You need to create a relationship on the product reference field you're using, and then the additional information will be available to you in your view.