{ "rules_add_15_for_each_line_item" : { "LABEL" : "Add $15 for each line item", "PLUGIN" : "reaction rule", "REQUIRES" : [ "rules", "commerce_line_item", "commerce_shipping" ], "ON" : [ "commerce_shipping_calculate_rate" ], "DO" : [ { "LOOP" : { "USING" : { "list" : [ "commerce-line-item:order:commerce-line-items" ] }, "ITEM" : { "line_item" : "Line Item" }, "DO" : [ { "component_rules_shipping_small_and_medium_tins" : { "USING" : { "line_item" : [ "line-item" ] }, "PROVIDE" : { "shipping_cost_line_item_tin_s_m" : { "shipping_cost_line_item_tin_s_m" : "Shipping Cost for Line Item S\/M Tin" } } } }, { "data_calc" : { "USING" : { "input_1" : [ "shipping-cost-line-item-tin-s-m" ], "op" : "*", "input_2" : "1200" }, "PROVIDE" : { "result" : { "pf_shipping_cost" : "Party Favor Shipping Cost_small" } } } }, { "commerce_line_item_unit_price_add" : { "commerce_line_item" : [ "commerce_line_item" ], "amount" : [ "pf-shipping-cost" ], "component_name" : "flat_rate_ups_ground", "round_mode" : "1" } } ] } } ] } }