Force 1 product per cart and quantity to one
i'm trying to add a rule to my drupal commerce install. i need to force 1 product per cart, with max quantity = 1.
Event: Before adding a product to the cart
Conditions : Elements: Total product quantity comparison Parameter: Order: [commerce_order] => Quantity >=1
and that's working smoothly.
But i can't find a rule to deny adding product to the cart. Already tried
Set a data value:
Selected data: commerce-order:commerce-line-items:1:quantity = 0
but it is not working. Just
Remove all products from an order
Parameter: Order to empty: [commerce_order]
works, but i'd like to remove the second product added, not the first one :)