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.


DrupalSiteBuilder created an issue. See original summary.

Lendude’s picture

Priority: Critical » Normal
Issue tags: -drupal commerce 2.x, -drupal commerce, -views

Since '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.

websiteworkspace’s picture

To 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 - {{ }}

for the title of the Views page view.

Sinan Erdem’s picture


Commerce only solution:

Nick Hope’s picture

Version: 8.4.0 » 8.6.x-dev

I 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.