Limit items in shopping cart Is there a way to limit users on my site to buy only 2 items from a list of products?
Am using Drupal 7 with Commerce module and Rules.
I added a new rule to when adding or removing and item from the shopping cart, it would check if the total quantity is bigger than 2, then it would remove the last element like this.


  Event
  Before adding a product to the cart
  
  After adding a product to the cart
  
  Conditions
  
  Total product quantity comparison
  Parameter: Order: [commerce_order], Operator: >, Quantity: 2
  
  Actions
  
  Remove an item from a list
  
  Selected list: commerce-order:commerce-line-items


and the item to remove is 


  commerce-order:commerce-line-items:2


Sadly its not working, and I really need your help. 
thanks
I had a similar problem:
I had to check for certain conditions before adding an item to the cart (not after adding). And if the condition is not met the item should not be added.

The only way i could resolve this is by adding a "Execute custom PHP code" action with the code:

drupal_goto('any_path');


This doesn't look very correct but its the only thing that worked for me.