Let me start off by saying that I am ultimately trying to get the product display from a line item. I would use commerce_rules_extra, which has a feature that is supposed to do this, but I could not get it to work. So I am trying to get the product display node for the product.
My strategy is to create a simple Rules Component that returns all product display nodes that reference a given product.
My component accepts a parameter of type: Commerce Product
My component has a Condition: Data comparison: Product:type - equals - "Product"
My component has an Action:
- Fetch entity by property, Entity type: Node, Property: Product (I believe this is the product reference field)
When I attempt to set the Value as the component's Parameter "Product", the action will not accept this—instead it gives this error:
The data type of the configured argument does not match the parameter's value requirement.
This would be the typical method for fetching nodes by property on an entityreference field but I can't do the same with this productreference field. Any hints would be greatly appreciated.