I have a few custom fields added to line items (so buyers can add specific information for each item they add to their cart.)

I need access to those custom fields using rules. However, I can't seem to get at them inside of a loop.

In order to get access them in the first place, I used "Entity has field", and they show up just fine to use in actions, until I get inside a loop. line-items:... doesn't include those custom fields.

What am I missing?


1 Answer 1


The trick for this is to use a component.

Create a new component, and check for the fields using "entity has field". Then, in the original rule, loop over the line items, and put the component inside that loop.

The kicker is that it is impossible (possibly? not I couldn't find a way) to get other product-level fields into this component.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.