Role dependent product variations

I have products with multiple variations referenced by taxonomy terms. I want users to see the variations based on their role when they view a product display.

I’ve tried Content Access and Taxonomy Access Control modules with no luck. Content Access only works with nodes (Product Displays) and Taxonomy Access Control doesn’t work on taxonomy referenced attributes.

I have a theory but no skill. I think it can be done with hooks. While product display is being viewed, have the code check if referenced product has a field checked off and user’s role, and based on that unset or hide certain variations.

I would greatly appreciate if someone could show me how to do that or give me any other suggestions. I’ve been banging my head against the keyboard for the past few days.

Posted: May 16, 2013