rules
I’ve created an experimental plugin to play around with PHP Rules this week. It’s small, nice and easy to use. In fact, since its rule class can be configured using setter methods, it would be easy to write simple wrapper classes that translate ecommerce related rules. Examples could be promotional rules like ‘is product xyz in the cart’.
OTOH, once you’ve written that much code to convert the rule ‘is xyz in the cart’ into a boolean value, it becomes trivial to add some and/or logic to tie this up with other ‘rules’ and evaluate that.
Now, it might be possible to leave a lot of the evaluation part to PHP Rules, but then I am not so sure about performance (not so much because of the PHP Rules code, but just because it unnecessarily increases the complexity of the ‘rule’ to evaluate).
Either way, this is probably the kick off for a new plugin to allow to set up and apply promotions based on rules, conditions and such. Still some way to go, though.

