I was using the Drupal 7 View to "emulate Drupal core's handling of taxonomy/term" , and display a grid of Products within each term, for my Product Catalog.

It works so far, but I notice that my View ends up showing all product entities, and not just product display nodes.

So for example, if I had Red, Green, and Blue entities under the category T-Shirts, my View shows all 3. But I only want it to show 1 tshirt, the display node.

How to do this? I know in the helpful video that Commerce Guys posted on Vimeo, it's just using the default Taxonomy pages, and not a Views-powered one. It seems to be discussed here as well, http://www.drupalcommerce.org/node/174, but I wanted to post on Drupal.org.

Comments

rszrama’s picture

Status: Active » Closed (works as designed)

You need to make the View display "Content" of type "Product display", not "Products". If you make the base table of your View the product table, it's going to show all products.

minneapolisdan’s picture

Thanks for the quick reply. I must be on the wrong track, maybe you can set me straight...

Just using Views' default settings, "emulate Drupal's core handling of taxonomy/term", I do get a grid of products, and it's only the nodes showing. I should limit by Content Type, that does make sense.

But I guess the issue for me is this - I wanted to show, within my View, not just Node Fields, but also show some Product Entity fields. Mostly, I wanted to include the Product Image Field, which I placed within my Product Entity.

To do so, it seemed I needed to add a Relationship to my Products (within views). Doing so made all the fields from my Product Type available. But it also made all the different entities show up in my View too.

Is this the wrong approach entirely? Or is there another step I can do to fix this?

rszrama’s picture

Status: Closed (works as designed) » Closed (duplicate)

Ahh, I see. No, this is actually a known issue where we need to figure out how exactly to group the results. There are other issues that may have posted solutions, but I know this is something of an outstanding issue at this point.

minneapolisdan’s picture

I could create my image field within my product display node instead of my product entity, then it wouldn't be an issue. Except that isn't the recommended way to do it, if I want to take advantage of cool features like the image changing to match product attributes. Or I suppose I could have 2 image fields, one for the product display and one for the product entity.

I will keep looking and hoping someone has a better solution, however.

minneapolisdan’s picture

Looks like this issue was discussed on the DrupalCommerce website, and 2 entries near the bottom make me think there's a short term solution. http://www.drupalcommerce.org/node/601

I would try this one, adding an extra product reference field to my product display set to a single value (size small for example) and use this product reference for the relationship, but I don't understand how to execute it.

chrisjlee’s picture

I have this problem too but i'm still a bit confused by the link referenced in #5.

What exactly is the delta field in views?

rszrama’s picture

It's the identifier of a single value in a multi-value field; starts at 0, increments by 1 for each value of the field.

keansmith’s picture

I was able to get a view of product displays (without displaying every permutation of a product) more easily than the process described in the preceeding posts. Configure your View as follows:
Format: Rendered Entity (Full Node)
Filter: Content Type = Product Display.

By playing with your Full Node and/or Teaser Fields Display (in BOTH your Product Display and Product), you can get it to display the fields you want.

Cheers!

rszrama’s picture

Indeed - I've done this on sites before and just apply a little bit of custom CSS to center things up in my grid.

summit’s picture

Status: Closed (duplicate) » Active

Hi, setting this to active again if it's ok. I think this issue is exactly about how to display the fields of the product with selectable terms, right?
I see the solution of #8 the most positive without a lot of theming and programming, but how to add stuff on the fields then?
With views you can rewrite, make links etc...on the views-field. With only using the Rendered Entity (Full Node) a lot of views possibilities are not used I think?
Greetings, Martijn

rszrama’s picture

Status: Active » Closed (duplicate)

I'm closing this again as that really sounds like an unrelated follow-up. The original issue as near as I can tell was about adding the "Referenced product" relationship but needing to restrict it to only show one result per node - this would be accomplished by filtering on the delta value of the product reference field. This will be labeled something like "Content: Product (field_product:delta)" in the Views filter selection list.

cristinaroxana’s picture

Hi!
I'm pretty new to drupal, and I want to know if it's possible how did you create a product catalog using taxonomy, using drupal 7?
Thank you

rszrama’s picture

Search for the video at http://www.drupalcommerce.org/videos.