add amount to shipping cost per product I have some products type , I want when  a specify product type is in order add amount to shipping cost.
my idea was  create a rule with condition Order contains products of particular product types  ,and select action add a amount to unit price but  in  item identifier *
Specify an identifier of a commerce Line item section I try everything but returned me error.

I try commerce-order:commerce-line-items: and commerce-order:commerce-line-items:0,commerce-order:commerce-line-items:1 ,commerce-order:commerce-order-total:

but all of them return me Data selector commerce-order:commerce-line-items: for parameter commerce_line_item is invalid. error.

what I should input there ? is my idea correct way to add amount to shipping price when specify products are in order?
You're probably wanting the basic solution explained in this video: https://commerceguys.com/blog/using-calculation-rules-add-item-shipping-commerce-shipping-screencast

With a little modification, it looks like this:


Add a new "Calculation rule" for your shipping service.
Add an action loop that loops through the line items in the order.
Add an action "Calculate a value" and multiply the quantity times a field which holds the shipping price you want to charge for that item and store it in a named variable.
Add an action "Add an amount to the unit price" that adds the named variable to the unit price of the shipping line item.