Created
February 18, 2014 14:22
-
-
Save andyg5000/9071943 to your computer and use it in GitHub Desktop.
Determines if an order has a shipping address that exists and is not domestic
This file contains hidden or 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_order_has_international_shipping" : { | |
"LABEL" : "Order has international shipping", | |
"PLUGIN" : "and", | |
"OWNER" : "rules", | |
"REQUIRES" : [ "rules", "commerce_order" ], | |
"USES VARIABLES" : { "commerce_order" : { "label" : "Commerce Order", "type" : "commerce_order" } }, | |
"AND" : [ | |
{ "entity_has_field" : { | |
"entity" : [ "commerce-order" ], | |
"field" : "commerce_customer_shipping" | |
} | |
}, | |
{ "NOT data_is_empty" : { "data" : [ "commerce-order:commerce-customer-shipping" ] } }, | |
{ "NOT commerce_order_compare_address" : { | |
"commerce_order" : [ "commerce_order" ], | |
"address_field" : "commerce_customer_shipping|commerce_customer_address", | |
"address_component" : "country", | |
"value" : "US" | |
} | |
} | |
] | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment