Advertisement
MrJoshMiller

Implement shipping if tagged with a term 1 of 2

Jun 20th, 2013
452
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.91 KB | None | 0 0
  1. { "commerce_shipping_method_flat_rate" : {
  2.     "LABEL" : "Collect rates: Flat rate",
  3.     "PLUGIN" : "reaction rule",
  4.     "REQUIRES" : [ "commerce_shipping", "rules" ],
  5.     "ON" : [ "commerce_shipping_collect_rates" ],
  6.     "DO" : [
  7.       { "commerce_shipping_method_collect_rates" : {
  8.           "shipping_method_name" : "flat_rate",
  9.           "commerce_order" : [ "commerce-order" ]
  10.         }
  11.       },
  12.       { "entity_query" : {
  13.           "USING" : {
  14.             "type" : "commerce_line_item",
  15.             "property" : "order_id",
  16.             "value" : [ "commerce-order:order-id" ],
  17.             "limit" : "1000"
  18.           },
  19.           "PROVIDE" : { "entity_fetched" : { "line_items" : "All line items" } }
  20.         }
  21.       },
  22.       { "LOOP" : {
  23.           "USING" : { "list" : [ "line-items" ] },
  24.           "ITEM" : { "line_item" : "Current line item" },
  25.           "DO" : []
  26.         }
  27.       }
  28.     ]
  29.   }
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement