Just making this official by giving it it's own issue, as it's already been mentioned in a couple of other issues.

There should be a rule condition to check a condition on a list of items. This will generally be a list of products in an order, but might also be a list of packages, a list of attributes, or whatever. There are currently conditions to "Check an order's products", but these are not very flexible and are hard to maintain.

Rules does not currently support this feature for conditions, although it does support loops on actions. This could probably be extended to conditions. See #821986-20: Evaluate conditions on list items.

If it looks like this could happen, the prep work for Ubercart would be to add some conditions on individual items that end up in lists, especially products. The obvious ones are "Product is of type" and "Product has taxonomy term". (These might actually be already covered with the basic Node functionality, but it's worth confirming.) The lists of products in packages and the lists of packages in shipments should be exposed to Rules, if they aren't already. There are probably other lists worth setting up.

Comments

DanZ’s picture

The best way to contribute to this issue is probably to contribute to #821986: Evaluate conditions on list items.

longwave’s picture

Status: Postponed » Fixed

https://drupal.org/project/rules_list_conditions provides list conditions for Rules, didn't know about this until now but looks very useful.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.