Shipping as a Percentage of Order Total

I have a client who is currently using PayPal to calculate shipping. The method she is using (and works well for her) is to have a scale of percentages.

e.g. For orders up to $10 shipping is 25% of the order total, over $10, up to $50 (say), 30% etc.

So the first thing that came to mind is the Table Rate plugin - I couldn't recall if it supported percentages or not. I checked - it doesn't.

So I quickly knocked up this Table Rate Percentage plugin.

Works exactly the same as Table Rate except when calculating shipping, the value is applied as a percentage of order total rather than simply being added on.

Couple of enhancements that will be good to do (I may do them soon lol):

1. Walk through the items in the order extracting full total order value (instead of the total AFTER coupons are applied)

2. Merge this into Table Rate, so "Amount or Percentage?" is a switch/option within the Table Rate plugin.

Anyway, I've got some working code, so sharing it here while I think of it....

http://dl.dropbox.com/u/2911989/mp-table-rate-percentage.php.zip