PDA

View Full Version : How to add fixed handling fee to USPS Real Time Rates


fmahannah
May 15th, 2005, 05:47 AM
Since a lot of people including myself have inidcated the need for a handling fee to be added in to the shipping costs returned by RTR I figured out a quick hack to let you do this. For example I needed to add $1.50 to each orders shipping regardless of which USPS method was being used:

Find the page usps_domestic_rate.func.php in the squirrelcart/functions/shipping folder.

Find the line near the bottom that says:
$rate['postage'] = $vals[$postage_i]['value'];

Change it by adding the handling fee you want at the end like this:
$rate['postage'] = $vals[$postage_i]['value'] + 1.50;

Hope this helps someone out :D

SatinRose
May 16th, 2005, 11:51 PM
fmahannah,
Thanks for this wonderful hack, I'm probably going to use it!

I'm wondering if we can have a checkbox where the user checks "insurance" or "delivery confirmation", then it can add in the amount that the checkbox is worth to the total, just as you added in handling. How would you do that?

Thanks!
-Lindsay