Shipping Quote based on Per Cent of Total Order
In the past few days I noticed a couple of people wanting to charge postage based on a percentage of the total order amount.
I've not come across any pre-existing code that enables this in a correct way - I do know of a `hack` to the "products weight" field, but the problem with that is obvious - what happens if a shop owner wants to use the weight feature of the products? There's probably other contributions but I like to make my own if I can.
So, I decided to spend a little time making my own "Percentage Shipping" contribution…
Introducing the "Club osCommerce % Shipping Module"
Snazzy name, eh? OK, so basically, in your admin area, you enable the "percent" shipping method and input the % rate you wish to charge - the default value is 10.00%. You can also add a "handling charge" if you need to - the default rate for this is zero.
Have a look at this video
It's kind of hard to see, but in the admin, I set the rate to 10.00% with a 4.95 handling charge. I then checked out a $39.99 product, and got a shipping quote of $8.95 - this being
$4.00 (10% of $39.99, rounded up)
$4.95 (handling charge)
—–
$8.95
There you have it. A nice easy contribution that will allow you to use shipping based on the value of the order. If you want to make changes to it, please go right ahead. If you want to change the wording, this is done in the LANGUAGE file that is a part of the download.
Get it
You can download this at the official osCommerce add-ons site.
Beer Me!
I would really appreciate it if anyone who uses this module would "buy me a beer" - the "beers" that I receive allow me to spend more time creating osCommerce add-ons etc - cheers, santé, prost!



Hello from the beer country (Belgium),
Your contrib was the one I was waiting for.
I install it on my OSCMax 2 RC3 and it works.
Easy to install and to configure, for a newbie what else to ask
Just, for people who are working with multiple language, don't forget to insert the /language/***/module/shipping/… in the different language files.
Again thank you very much.
Patrick
Comment by Patrick — May 22, 2008 @ 6:53 pm
Hi Patrick - thanks for letting me know it works with oscmax
There's nothing better than a Belgian Beer, cheers.
Comment by Gary — May 22, 2008 @ 9:32 pm
Have you experienced getting your mod to work with the GoogleCheckout mod?
Google knows nothing of percent when you install your mod.
Comment by Jason Farrow — December 2, 2008 @ 11:34 am
Jason - never tried it. Couldn't tell you. This is only a shipping modification, hence should work OK with all other contributions that are coded correctly.
Comment by Gary — December 2, 2008 @ 1:52 pm
Awesome, this is what I've been looking for! How could I add another percentage level? Say I have two options: 1 option for express post that I set to 8% and one for regular post that I'd set to 4%. Just rename the php files and install?
Comment by Mike — December 9, 2008 @ 7:47 pm
Mike - you'd probably need to rename the files and ALSO rename the "functions" etc inside those files. Cheers, Gary
Comment by Gary — December 9, 2008 @ 8:24 pm