1

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

1

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.

0
0

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 that you have read and understand our privacy policy and code of conduct.

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