Views should support the - Content: Has taxonomy term ID (with depth) - contextual filter for entity types other than node/content entities, for example, drupal commerce entities. In other words:
Entity: Has taxonomy term ID (with depth)
Entity: Has taxonomy term ID
for any entity type available to Views, such as Drupal Commerce entities: product, product variation, and so on.
(use case)
It is not currently possible to create a contextual filter - Entity: Has taxonomy term ID (with depth) - for example when building a taxonomy traversal view to display drupal commerce entities based on a taxonomy (for example a product category taxonomy) to setup with the taxonomy view integration module to provide traversal of commerce entities (products) by product category using a product category taxonomy.
Comments
Comment #2
lendudeSince 'has taxonomy term' arguments use the 'taxonomy_index' table and that table only tracks tagged nodes, this requires more then just adding an argument that handles this for all entities unfortunately. But yeah, it would be nice to get rid of the node specific stuff.
Setting to a more fitting status.
Comment #3
websiteworkspace commentedTo add some more detail ...
What is needed even more importantly, and which worked with view on nodes traversing a taxonomy path /taxonomy/term/% in D7 is:
Entity: Has taxonomy term name (with depth)
Entity: Has taxonomy term name
So that when using such - contextual filters - with "override title" it is then possible to display a dynamic title with the name of the taxonomy term from the URL as in:
Entities with Taxonomy Term - {{ term.name }}
for the title of the Views page view.
Comment #4
Sinan Erdem commented@websiteworkspace,
Commerce only solution: https://www.drupal.org/project/product_taxonomy_filter
Comment #5
nick hope commentedI believe a Media: Has taxonomy term ID (with depth) contextual filter would help my case, whereby I would like to show all media from one location and its sub-locations.
Comment #6
willeaton commentedI really need this for commerce products, its a "really would be very nice to have"
Comment #7
rudam commentedI'm having this issue listing users by taxonomy term, theres no depth filter.
Comment #9
olivier.br commentedSolution for media entities, based on module in #4.
Views: Media taxonomy filter
Comment #10
vegantriathleteWith media part of core now, it would definitely be nice to have Media: Has taxonomy term ID (with depth)
Comment #11
jazzper commentedI need this for Paragraphs.
This is a duplicate.
There is a Drupal 7 module named Taxonomy Entity Index but it seems to be abandoned. A start was made on a Drupal 8 version here but is not working see.
Comment #12
adamps commentedAgree this looks like a duplicate.
Comment #13
swatchion commentedThanks for making drupal awesome and keeping it that way, really appreciated.
However this feature is still unavailable, and it's needed despaired. Commerce: Product taxonomy filter is not working under 8.9, anyone have a solution, please share.
Comment #14
lukasss commented@swatchion just use search api. Its easy and well
Comment #15
swatchion commented@lukasss Thanks for sharing, will looking into it.
Comment #16
sundharSolution for all entities with taxonomy filter, based on module.
entity_taxonomy
It supports all major entities like user, comments, commerce_product, paragraphs and etc...
This module maintain taxonomy_index based on entity_type.
Comment #17
vasiliyrepin commentedIf you need to make output of Products with contextual filter: "Product has taxonomy term ID" you need
This module: taxonomy filter ,
works good for me, Drupal 8-9. You can make output some Views, for example, Products and Content. It uses View for Product, View for Content and View for Taxomomy (/taxonomy/term/%).