I have created a rule which add the shipping methods on cart page. It works fine when we add or delete the items from cart. BUT there is no event available on rules which fire when we increase the product quantity and update the cart.
I already used the event "After updating an existing commerce line item" but it is also not doing the job.
Here is my rule:
{ "rules_auto_add_shipping_service" : {
"LABEL" : "Auto-add shipping service",
"PLUGIN" : "reaction rule",
"OWNER" : "rules",
"REQUIRES" : [
"commerce_order",
"commerce_shipping",
"commerce_cart",
"commerce_rules_extra"
],
"ON" : {
"commerce_cart_product_add" : [],
"commerce_cart_product_remove" : [],
"commerce_rules_extra_line_item_quantity_changed" : []
},
"IF" : [
{ "commerce_order_compare_total_product_quantity" : {
"commerce_order" : [ "commerce_order" ],
"operator" : "\u003E=",
"value" : "1"
}
}
],
"DO" : [
{ "commerce_shipping_method_collect_rates" : {
"shipping_method_name" : "flat_rate",
"commerce_order" : [ "commerce-order" ]
}
},
{ "commerce_shipping_rate_apply" : {
"commerce_order" : [ "commerce-order" ],
"shipping_service_name" : [ "" ]
}
}
]
}
}