Role based product variations
I have products with multiple variations. How can I control which variations users can see and choose based on their role?
Asked by: alexb03060
on May 15, 2013
One possible idea could be:
- Add a "role_field" to the Product Variation Type
- Implement hook_entity_view_alter (viewing products list) and hook_form_alter (altering the add_to_cart form)
Not really sure if that's the best approach.
You could also play with Views and Access Control by role, but in that case you would (possibly) need a Product Variation Type per role, for easy view creation/filtering.