function commerce_pado_default_rules_configuration in Commerce Product Add-on 7
File
- ./commerce_pado.rules_defaults.inc, line 8
Code
function commerce_pado_default_rules_configuration() {
$exported_rule = '{ "commerce_pado_add_selected_add_ons_to_cart" : {
"LABEL" : "Add the selected product add-on to the cart",
"PLUGIN" : "reaction rule",
"REQUIRES" : [ "commerce_cart", "commerce_pado" ],
"ON" : [ "commerce_pado_add_to_cart" ],
"DO" : [
{ "commerce_cart_product_add_by_sku" : {
"USING" : {
"user" : [ "site:current-user" ],
"sku" : [ "commerce-product:sku" ],
"quantity" : [ "quantity" ],
"combine" : 1
},
"PROVIDE" : { "product_add_line_item" : { "product_add_line_item" : "Added product line item" } }
}
}
]
}
}';
$rules['commerce_pado_add_selected_add_ons_to_cart'] = rules_import($exported_rule);
return $rules;
}