Created
September 5, 2014 09:50
-
-
Save klickreflex/362faab675d80da48c42 to your computer and use it in GitHub Desktop.
Drupal: Disable Shipping pane and shipping address collection if order contains only products of certain type
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ "rules_disable_shipping_digital" : { | |
"LABEL" : "Disable Shipping for Digital Products", | |
"PLUGIN" : "reaction rule", | |
"OWNER" : "rules", | |
"REQUIRES" : [ "commerce_order", "commerce_rules_extra" ], | |
"ON" : { "process_checkout_pane" : [] }, | |
"IF" : [ | |
{ "NOT commerce_order_contains_product_type" : { | |
"commerce_order" : [ "commerce_order" ], | |
"product_type" : { "value" : { "physical_product" : "physical_product" } }, | |
"operator" : "\u003E=", | |
"value" : "1" | |
} | |
} | |
], | |
"DO" : [ | |
{ "commerce_rules_extra_change_pane" : { | |
"pane_id" : "customer_profile_shipping", | |
"page_id" : "\u003Csame\u003E", | |
"enabled" : 0 | |
} | |
}, | |
{ "commerce_rules_extra_change_pane" : { | |
"pane_id" : "commerce_shipping", | |
"page_id" : "\u003Csame\u003E", | |
"enabled" : 0 | |
} | |
} | |
] | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment