{ "rules_add_shipping_price_to_product_price" : {
"LABEL" : "Add Shipping Price to Product Price",
"PLUGIN" : "reaction rule",
"REQUIRES" : [ "rules", "commerce_line_item", "commerce_product_reference" ],
"ON" : [ "commerce_product_calculate_sell_price" ],
"IF" : [
{ "entity_has_field" : { "entity" : [ "commerce-line-item" ], "field" : "commerce_product" } },
{ "entity_has_field" : {
"entity" : [ "commerce-line-item:commerce-product" ],
"field" : "field_shipping_price"
}
},
{ "NOT data_is_empty" : { "data" : [ "commerce-line-item:commerce-product:field-shipping-price:amount" ] } }
],
"DO" : [
{ "commerce_line_item_unit_price_add" : {
"commerce_line_item" : [ "commerce_line_item" ],
"amount" : [ "commerce-line-item:commerce-product:field-shipping-price:amount" ],
"component_name" : "shipping",
"round_mode" : "1"
}
}
]
}
}