In Drupal Commerce, how to prompt a warning message and keep it in checkout
process if an anonymous inputs a registered email? I know there is a Commerce Checkout Login
, but it is just an AJAX addon.
I believe I can do it through Rules and that's what I did.
- Event: Process checkout pane
- Conditions:
- Data comparison: [commerce-order:uid] == 0
- NOT Data value is empty: [commerce-order:mail]
- Entity exists by property: User/Email, [commerce-order:mail]
- Actions:
- Show a message on the site: Warning, ...
- Update checkout status: checkout
In first trial, it seems work well. But the weird thing is, when I change the email field to an unregistered one, I can still spot the warning message generated by Show a message on the site
. Is there something wrong in my rule setup?
Refer to this Anonymous can use registered email address: intended behavior?.
Commerce checkout login
it will solve that issue by allowing the user to login if they enter a registered email address.Commerce checkout login
does that job well. But anonymous can just ignore it and keep the checkout, which is what I like to prevent.