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 2


You could use Rules to enforce login when the product is added to the cart.


  • 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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.