Advertisement
MrJoshMiller

Taxes based on Content Type - Part 2 of 2

Jun 20th, 2013
297
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.72 KB | None | 0 0
  1. { "rules_apply_tax_if_display_node_is_certain_type" : {
  2.     "LABEL" : "Apply tax if display node is certain type",
  3.     "PLUGIN" : "rule",
  4.     "REQUIRES" : [ "rules", "commerce_tax" ],
  5.     "USES VARIABLES" : {
  6.       "line_item" : { "label" : "line_item", "type" : "commerce_line_item" },
  7.       "display_node" : { "label" : "display_node", "type" : "node" }
  8.     },
  9.     "IF" : [
  10.       { "node_is_of_type" : {
  11.           "node" : [ "display-node" ],
  12.           "type" : { "value" : { "page" : "page" } }
  13.         }
  14.       }
  15.     ],
  16.     "DO" : [
  17.       { "commerce_tax_calculate_by_type" : { "commerce_line_item" : [ "line-item" ], "tax_type_name" : "vat" } }
  18.     ],
  19.     "PROVIDES VARIABLES" : [ "line_item", "display_node" ]
  20.   }
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement