jmmalunao
jmmalunao

Reputation: 26

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

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

Upvotes: 1

Views: 279

Answers (1)

PH83
PH83

Reputation: 92

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

Upvotes: 1

Related Questions