I have no idea whether it is possible. Right now the product displays are chosen in the view. Is it possible to create the view, so it just includes all product display types, so new display types you create are automatically included in the result for the view without the developer having to manually add new product display types.

Comments

bojanz’s picture

On which view is that?

We have a "Is this node a product display?" views filter, so it can be used anywhere. If there's a list of node types used instead of that filter, then that needs to be fixed.

lsolesen’s picture

View: Commerce Backoffice: Products

But it is also in the Facet Search API, where you have to choose your bundles and need to make sure, that you choose the correct bundles, and because of that the Display Products (Search Commerce Display) does not show all products if you add another product display type.

vasike’s picture

this could be done by using "Product Display type" filter.
imho The issue here is that this filter is built in "Commerce Kickstart Content UI".
I think this filter should be moved in Drupal Commerce package in Product Reference module, before we start using it.

bojanz’s picture

Let's move that filter from Content UI to Commerce itself.
There's already an open issue: #1031494: Product Display views filters: Is Product Display? & Product Displays Content types.

We should then make sure that all relevant views are using it (I believe the Backoffice products view doesn't use it currently, which is a problem).

vasike’s picture

patch posted on Drupal commerce issue #1031494-6: Product Display views filters: Is Product Display? & Product Displays Content types.
Should i rebuild the view Drupal commerce patched?

GuGuss’s picture

@vasike : yes, our views should use that filter !

vasike’s picture

Status: Active » Needs review

here is the commit : https://code.drupalcommerce.org/#/c/201/
Changed the filter for Product displays for the Products view, in the Commerce Backoffice module. Drupal commerce patch included

vasike’s picture

Question:
Actually do you really need an extra filter as we have "Content: Referenced product" Relationship REQUIRED.
which means we'll get only nodes with referenced products only.

Of course this filter could be usefull, for view without this relationship (and/or required).

vasike’s picture

this issue will be covered by others issues
#1031494: Product Display views filters: Is Product Display? & Product Displays Content types - the views filters
&
#1701652: Rebuild and retheme the product listing view - implementation

so, should we make this duplicate or closed somehow?
what about the gerrit commit? should we abandone it?

bojanz’s picture

Title: Make product views more generic » Make the Search API index include all product display types automatically.
Assigned: Unassigned » jsacksick

Okay, so we're handling the product display part in #1701652: Rebuild and retheme the product listing view.

In this issue we can try to solve:

But it is also in the Facet Search API, where you have to choose your bundles and need to make sure, that you choose the correct bundles, and because of that the Display Products (Search Commerce Display) does not show all products if you add another product display type.

I don't know if this is possible. Assigning it to Jonathan, he'll know if this is doable (and will be able to implement it if it is).

bojanz’s picture

Status: Needs review » Active
jsacksick’s picture

This could be done by extending the bundle filter data alteration to make that dynamic, for now what you can do lsolesen is "Go to admin/config/search/search_api/index/search_commerce_display/workflow" and check the product display types you want to index.

jsacksick’s picture

Status: Active » Needs review
bojanz’s picture

Status: Needs review » Fixed

Merged!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.