Created
December 21, 2011 16:09
-
-
Save steffenr/1506564 to your computer and use it in GitHub Desktop.
Rule - BankTransfer for File-Products only
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
{ "commerce_payment_bank_transfer" : { | |
"LABEL" : "Bank Transfer", | |
"PLUGIN" : "reaction rule", | |
"WEIGHT" : "-1", | |
"REQUIRES" : [ "rules", "commerce_payment" ], | |
"ON" : [ "commerce_payment_methods" ], | |
"DO" : [ | |
{ "LOOP" : { | |
"USING" : { "list" : [ "site:current-cart-order:commerce-line-items" ] }, | |
"ITEM" : { "list_item" : "Current list item" }, | |
"DO" : [ | |
{ "component_rules_bank_transfer_physical" : { "line_item" : [ "list-item" ] } } | |
] | |
} | |
} | |
] | |
} | |
} |
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_bank_transfer_physical" : { | |
"LABEL" : "Bank Transfer for physical Products", | |
"PLUGIN" : "rule", | |
"REQUIRES" : [ "rules", "commerce_payment" ], | |
"USES VARIABLES" : { "line_item" : { "label" : "Line Item", "type" : "commerce_line_item" } }, | |
"IF" : [ | |
{ "entity_has_field" : { "entity" : [ "line-item" ], "field" : "commerce_file_line_item_files" } } | |
], | |
"DO" : [ | |
{ "commerce_payment_enable_bank_transfer" : { | |
"commerce_order" : [ "site:current-cart-order" ], | |
"payment_method" : { "value" : { | |
"method_id" : "bank_transfer", | |
"settings" : { | |
"details" : { | |
"account_owner" : "Account", | |
"account_number" : "Number", | |
"account_iban" : "IBAN", | |
"bank_code_appellation" : "", | |
"bank_code" : "", | |
"account_swift" : "", | |
"account_bank" : "", | |
"account_branch" : "" | |
}, | |
"subject_oid" : 0, | |
"policy" : "" | |
} | |
} | |
} | |
} | |
} | |
] | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment