Tags/topics: 
1
Answers
Vote up!
0
Vote down!

Condition commerce_order_contains_product always evaluates to false

Hi

I'm trying to use a Rule to assign a Role to a user who purchases a particular product.

I've entered the SKU for my product, as asked, in the condition for the rule, but when it runs the Rule, the debug log shows:

The condition commerce_order_contains_product evaluated to FALSE

I've copied and pasted the SKU, so I know it's correct.

I am using:

Commerce v 7.x-1.3
Rules v7.x-2.2

What's the problem?

Thanks,

Glenn

Asked by: glennnz
on August 6, 2012

Comments

1 Answer

Vote up!
0
Vote down!

glennnz,

It's been my experience that it works very well. In fact, I just created a rule yesterday that worked. What you need is an event that brings the order entity into view. So, for your example, I would create a rule like this:

I'm using Kickstart 2, and if you purchase the "IPH1-BLK-OS" product, you become an administrator...

http://www.evernote.com/shard/s218/sh/f1514731-711e-47fc-a4f1-f3443aae25...

^-- thats the part of the rule you were struggling with

This is the rule working: http://www.evernote.com/shard/s218/sh/cec91acd-c52a-411e-b77b-3fc40c0e97...

And finally, this is the rule export: http://pastebin.com/H8gqh12u

Josh Miller
Answer by: Josh Miller
Posted: Sep 6, 2012