Drupal 9 : Contextual Filter Based Upon Current User and commerce Product with Company

Viewed 10

I have created a Taxonomy of Organizations. I have then added a custom required field to my User accounts call "Organization". Also I have added the custom "Organization" field in commerce Product.

I have created view, when user login they should view the Product which is common to all as well as product belong to his/her organisation.

For Example:

Consider Product A , B & C

Product A belong to X organisation. Product B & C common to all the users

User1 - X organisation User2 - Y organisation

When User1 logs in he should see, Product A, B & C User2 should see only B & C

how to achieve this using views contextual filter

Regards Girija S

0 Answers
Related