Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

% Handling fee on postage


Guest

Recommended Posts

I would like to find a way to charge a percentage of the shipping cost as a handling fee. Within the standard modules I can charge a dollar amount for handling per each shipping module, but not a percentage. I've been through the board and I've seen this question asked once or twice, but not answered. Ideas?

Link to comment
Share on other sites

You do this with an order_total module, i.e. like tax does. I've never done this, so I don't have any more advice. Others have posted about doing it though. There might even be a relevant contribution.

 

Hth,

Matt

Link to comment
Share on other sites

  • 8 months later...

Hi All,

 

I've been digging around for a solution to add HANDLING FEES as a PERCENTAGE of the total shipping and found no result. It seems like many people are having the same problem. I decided to hack the code a little and come up with something myself.

 

Here's my solution. Hopefully it will work for someone out there as well.

 

In the file ups.php under /includes/modules/shipping modify the following code:

 

 

Around Line 102:

 

'cost' => ($cost + MODULE_SHIPPING_UPS_HANDLING) * $shipping_num_boxes);

 

Here MODULE_SHIPPING_UPS_HANDLING is the "flat handling fee" that can be set in the admin console for shipping via ups. What I've done is to change the code so that it takes in the Handling Fee as a percentage instead of a flat fee and this is the code I came up with.

 

'cost' => ($cost += ($cost *= MODULE_SHIPPING_UPS_HANDLING/100)) * $shipping_num_boxes);

 

Hope this helps someone. Feel free to contact me if there are any questions. I try to give back to the community for all the times I've been helped out as well. :)

 

 

"There is no try, there is only do or do not" -yoda

Link to comment
Share on other sites

Revision: Please note the code should instead read.

 

'cost' => ($cost + ($cost * MODULE_SHIPPING_UPS_HANDLING/100)) *

$shipping_num_boxes);

Link to comment
Share on other sites

  • 1 month later...

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...