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.
Comments
How to add a condition?
First, thanks for this screencast, which is very helpful.
I have follow your steps and have the solution working, but my issue is that I have 2 different flat rates and would like that the rule apply to the appropriate flat rate only.
With your example it apply to both flat rates.
Notice that maybe my full approach is wrong. Actually, my aim is to have 2 shipping rates (economy and priority) with a price per-items value.
Thanks for help.
Is country codes working OK with shipping?
Hello Randy,
Great video, as the whole serie.
I am trying to create two different Shipping services, one local and other international. I guess the only to separate local from international is indicating the shipping country to be one (say US) or NOT one (negate US).
It's not working fine at this point. I just followed your video, but maybe I am doing something wrong.
Is it possible to create lists of Contry Regions, like Latin America or Europe, and insert all the countries of that region in the list? It is easier than compare the countries one by one..
I appreciate your comments and, again, thanks a lot for the series.
juan
Previous post
Actually I found some help here: http://drupal.org/node/1415638 (Add per item amount effects all shipping choices - Rule).
Add new comment