Shipping: calculate the shipping amount based on the total amount of the order
Hi, I am turning crazy with rules and shipping 2.0 calculation.
It seems to me that all of Randy Fay' screencasts deal with doing calculation based on each line item. What I am trying to do is much easier, I just need a calculation based on the total amount in the shopping cart.
So I have added a calculation rule with 2 actions :
Do some calculation
Set the amount in shipping unit price.
Unfortunately, nothing happens, I always have my flat amount whatever variable I am trying to set !
Here is the result from rule :
0 ms Rule Calcul des frais de livraison fires.
0.68 ms Unable to get the data value for the variable or parameter input_1. Error: Unable to get the data property amount as the parent data structure is not set.
0.964 ms Unable to evaluate action data_calc. 
1.265 ms Unable to get variable calcul_livraison_1, it is not defined.
1.532 ms Unable to evaluate action commerce_line_item_unit_price_add. 
1.588 ms Rule Calcul des frais de livraison has fired.
1.857 ms Finished reacting on event Calculating a shipping rate.
Sounds like I need some parent structure somewhere but how do I find that ?
Thanks a lot.