I'm building a commerce site using drupal commerce. I know how to have anonymous users checkout, I know how to require login before checkout, but I can't figure out how to specify for each product if it requires a login or not...
2 Answers
You could use Rules to enforce login when the product is added to the cart.
e.g
- Event: Before/After adding product to cart
- Conditions: if user is not logged in (i.e. uid=0) and product match (e.g SKU matches)
- Action: Redirect to user/login?destination=cart
Something like that could suffice.
You could add some special field to flag this. After you can use rules to force some users to log in.