Using Calculation Rules to Add Per-Item Shipping in Commerce Shipping
In this screencast I demonstrate how to do shipping charges per item in the cart. It shows using a loop in Rules and how to do something new and different with shipping.
We want to add $5.00 to the shipping charge for every item they have. So if the quantity is 5 for some line item, we'll add $25 to the shipping charge.
The technique is this:
* Add a shipping service. We're using a flat rate service with a $10 base rate.
* Add a new "Calculation rule" for that 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 500 ($5.00) and put the result 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.