In Drupal 8. Drupal Commerce. How to hide a view based on Product field (Entity Reference - Taxonomy)

269 views Asked by At

If I clicked a certain Product, it will be redirect to Product Page. Within this page, views will be shown or hides base on Product Category.

Example.

If Product Category is A. - Shows View A and, - Hides View B.

If Product Category is B. - Shows View B and, - Hides View A

1

There are 1 answers

0
PH83 On

I would suggest looking into Contextual filters with a reference to the fields in question. i added the d.o website info on contextual filters. But if your using commerce guys profile, checkout some of the checkout view setup.

https://www.drupal.org/docs/8/core/modules/views/add-a-contextual-filter-to-a-view