I am trying to create a new module for a single shopping cart rule like this:
1) Buy any 3-5 qty of products from category A (can be any product or combination of products) - get 10% discount for them only.
2) Buy any 5+ qty of products from category A (can be any product or combination of products) - get 15% discount for them only.
I know how to set the conditions, but my problem is when I observe sales_rule_validator_process how I can get what number of items the customer have in his basket which are compatible with my rule.
E.g. I can have 2xA (CatA), 3xB (CatB), 1xC(Cat A) in my basket, which should lead that I have Qty 3 and that means I need to set 10% discount.