commerce show message if anonymous user adds product to cart What I am trying to accomplish is :

If an anonymous user adds a product to the cart, I would like to display a message on the site that says : Login to check out

what I did is the following:
Added a new rule with the event: After adding product to cart

Condition: Data comparison, Data to compare: site:current-user:roles, The value to compare the data with: anonymous user

Action: Show message on the site : Please Login or Sign Up in order to checkout

but the message still does not show if an anonymous user adds a product to the cart
OK things worked out when I changed the condition to : user has role and passed in the current user as a parameter

I would still love to know where I went wrong in my first approach