In drupal commerce I want the rules module to do some action when the order status changes to completed
. In fact, after buying some product an order is added to order list. Then, what I need is that when the moderator comes and change the order status to completed
the order owner get permission to see some content type.
I have tested these rules but none of them worked!!
- Event: After updating an existing commerce order
Condition: Execute custom PHP code
if([commerce-order:status] == 'completed') return TRUE; else return FALSE;
or this one:
- Event: After updating an existing commerce order
Condition: Data comparison
Parameter: Data to compare: [commerce-order:status], Data value: Completed
or this one:
- Event: After updating an existing commerce order
Condition: Data comparison
Parameter: Data to compare: [commerce-order:state], Data value: Completed
In fact, without adding any condition the reaction is done after adding an order by customers (do not wait for moderators to complete the order) and with any of these conditions, rules never fire and the is reaction never done.