{ "rules_a" : { "LABEL" : "Add 15.00 CHF for each product shipped", "PLUGIN" : "reaction rule", "TAGS" : [ "shipping" ], "REQUIRES" : [ "rules", "commerce_line_item", "commerce_shipping" ], "ON" : [ "commerce_shipping_calculate_rate" ], "IF" : [ { "data_is" : { "data" : [ "commerce-line-item:type" ], "value" : "shipping" } }, { "data_is" : { "data" : [ "commerce-line-item:commerce-shipping-service" ], "value" : "postpac_priority" } } ], "DO" : [ { "LOOP" : { "USING" : { "list" : [ "commerce-line-item:order:commerce-line-items" ] }, "ITEM" : { "line_item" : "Line Item" }, "DO" : [ { "data_calc" : { "USING" : { "input_1" : [ "line-item:quantity" ], "op" : "*", "input_2" : "1500" }, "PROVIDE" : { "result" : { "calculated_line_item_priority_shipping" : "Calculated Line Item Priority Shipping" } } } }, { "commerce_line_item_unit_price_add" : { "commerce_line_item" : [ "commerce-line-item" ], "amount" : [ "calculated-line-item-priority-shipping" ], "component_name" : "flat_rate_postpac_priority", "round_mode" : "0" } } ] } } ] } }