Hi all,

i just wanted to use the Contextual Filter "Taxonomy: Term ID (with depth)" or "Taxonomy Term: Has content with depth" or alike. But somehow there is no "with depth" at all showing up in the contextual filter.

It took me several hours to check out several possible "problem solvers" like:
- enable "Term Depth access" Modul"
- edit "Search API" and added + reindex several fields that "might" be the problem (like "parent id" fields etc.)
- several cache flushes
- created new view just for "taxonomy"

In the end, i reinstalled commerce kickstart again on a new vhost with a new DB with no special selections (no multilingual etc.) but with no results.

So that is the bug: Out of the box, its not possible to use the Contextual Filter "xxx (with depth)".

To reproduce: Clean Commerce Kickstart 2.17 (inc. "Example Shop"), go to "views" => "Collection products" => Advanced => Contextual Filters => try to find anything that has to to with "depth" (Content, Taxonomy, Catalog etc.)

OK, thats all for now. If you have any further questions, please feel free to ask!

Greets,

Chris

Comments

bisonbleu’s picture

I have the same issue.

Though I'm not sure this is a bug per se. The Contextual Filter "Taxonomy: Term ID (with depth)" is available in a Content view but it isn't in a Product display view. Is this by design?

In my use case, the Product category vocabulary is not flat as it is in CK2 (it's a tree). I want to change the default behavior of the Collection products (Product display) view (which works well for a flat vocab but not so well for a tree) so that it can also display products for child terms.

For example, clicking on Parent term (see below) would display Prod1, Prod2 and Prod3. Clicking on child term 1 would only display Prod1 and Prod2. Etc.

Parent term
    - child term 1
        Prod1
        Prod2
    - child term 2
        Prod3

I think that all would agree that this behavior is friendlier for a taxonomy tree.

Any idea how we can achieve this with CK2 no-demo-store installation?

Thanks!

bisonbleu’s picture

adding related issue

bisonbleu’s picture

Found a workaround.

mglaman’s picture

Status: Active » Closed (works as designed)

The catalog is using Search API. Review solution in #2198765: Edit "collection products" view: show child items