1
Answers
Vote up!
1
Vote down!

Rules: Node token for the event When an order is first paid in full

Is it possible to have a node token in Conditions or Actions in rules when in Events 'When an order is first paid in full' is used? For example, it would eveb be better to have a node token (node) in Conditions-'Entity has field' and in Actions-'Set a data value'.

The node is of a custom type (I suppose that there is no difference between types for this problem, it can be related, for example, to an article). Comments are usual and related to the node. In comments the property Product reference-Inline entity form-Single value was added. A user can add a product to a comment and then it can be bought by somebody. I have already tried Extra Rules Get the referencing node from the line item but it doesn't work.

Asked by: Drusite
on January 4, 2016

1 Answer

Vote up!
0
Vote down!

Hey Drusite,

You could grab the entity in Rules by using a few Entity has... conditions, starting backwards by line item field (the product) then another for product's parent entity (which should be product display or node).

But you may have better luck using components to grab the product and node for the order, and attach the component to your rule.

This post should provide some examples of similar goals. https://drupalcommerce.org/faq/rules-field-data-selection

Travis
Answer by: Travis
Posted: Jan 5, 2016