Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save kadimi/9574678 to your computer and use it in GitHub Desktop.
Save kadimi/9574678 to your computer and use it in GitHub Desktop.
Drupal Commerce: send and email with the Rules module when the order status is changed to "In progress" or "Completed"
{ "rules_notif_order_status_update_in_progress_or_completed" : {
"LABEL" : "Notification on order status update to \u0022in progress\u0022 or \u0022completed\u0022",
"PLUGIN" : "reaction rule",
"TAGS" : [ "Custom" ],
"REQUIRES" : [ "rules", "rules_i18n", "mimemail", "entity" ],
"ON" : [ "commerce_order_update" ],
"IF" : [
{ "data_is" : {
"data" : [ "commerce-order:status" ],
"op" : "IN",
"value" : { "value" : { "processing" : "processing", "completed" : "completed" } }
}
},
{ "NOT data_is" : {
"data" : [ "commerce-order:status" ],
"value" : [ "commerce-order-unchanged:status" ]
}
}
],
"DO" : [
{ "mimemail" : {
"key" : "Order status changed to \u0022In Progress\u0022 or \u0022Completed\u0022",
"to" : [ "commerce-order:owner:mail" ],
"cc" : [ "" ],
"bcc" : [ "" ],
"from_name" : [ "site:name" ],
"from_mail" : [ "site:mail" ],
"subject" : "Order status changed",
"body" : "[commerce-order:status-title]",
"language" : [ "" ]
}
}
]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment