How do I change the order in which completion rules fire?
There is a default Completition reaction rule. I wanted to add a second rule which executes some custom PHP but it's never executed.
I see no way to change the weight as in other rules. I also tried adding what I need as an action in that default rule, but it also doesn't seem to fire.
This is the reaction rule that fires on order completion.
{ "rules_completion" : {
"LABEL" : "completion",
"PLUGIN" : "reaction rule",
"REQUIRES" : [ "php", "rules", "commerce_checkout" ],
"ON" : [ "commerce_checkout_complete" ],
"DO" : [
{ "php_eval" : { "code" : "jch_send_quote()" } },
{ "commerce_checkout_complete" : { "commerce_order" : [ "commerce_order" ] } }
]
}
This is the code for jch_send_quote()
which doesn't seem to fire.
function jch_send_quote(){
global $user;
watchdog('dev', 'jch_send_quote running here');
drupal_set_message($user->uid);
die('jch_send_quote running here')
}
What am I missing?