Advertisement
MrJoshMiller

Drupal Commerce Rule Export: Publish Paid Article

Apr 16th, 2013
444
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.63 KB | None | 0 0
  1. { "rules_publish_paid_article" : {
  2.     "LABEL" : "Publish paid article",
  3.     "PLUGIN" : "reaction rule",
  4.     "REQUIRES" : [ "rules", "entity" ],
  5.     "ON" : [ "commerce_order_update" ],
  6.     "IF" : [
  7.       { "data_is" : { "data" : [ "commerce-order:status" ], "value" : "completed" } }
  8.     ],
  9.     "DO" : [
  10.       { "LOOP" : {
  11.           "USING" : { "list" : [ "commerce-order:commerce-line-items" ] },
  12.           "ITEM" : { "line_item" : "Current Line Item" },
  13.           "DO" : [
  14.             { "component_rules_if_line_item_has_field_do_this_action" : { "line_item" : [ "line_item" ] } }
  15.           ]
  16.         }
  17.       }
  18.     ]
  19.   }
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement