Forums / Built-in Shipping and Payment Modules / Needing an additional percentage handling fee

Needing an additional percentage handling fee

Locked

Views: 1,898

Results 1 to 3 of 3
This thread is locked. New replies are disabled.
5 Feb 2008, 6:56 PM
#1
bxc avatar

bxc

New Zenner

Join Date:
Feb 2008
Posts:
1
Plugin Contributions:
0

Needing an additional percentage handling fee

a friend of mine had me install and configure his zencart... we have it doing USPS rates plus a flat handling fee per box... now he wants to calculate a percentage of the (new) total cost (after shipping and handling has been considered once), and add that in as part of the handling fee

should I make changes directly to the USPS module? everytime I try putting P% into the handling fee slot, it ignores the % and just treats it as the per-box rate.

27 Mar 2008, 8:35 PM
#2
wilpack avatar

wilpack

New Zenner

Join Date:
Mar 2008
Posts:
10
Plugin Contributions:
0

Re: Needing an additional percentage handling fee

I also am interested in doing this. Anyone find an answer?

4 Nov 2009, 7:46 PM
#3
wilson_usa avatar

wilson_usa

New Zenner

Join Date:
Nov 2009
Posts:
2
Plugin Contributions:
0

Re: Needing an additional percentage handling fee

BxC:

a friend of mine had me install and configure his zencart... we have it doing USPS rates plus a flat handling fee per box... now he wants to calculate a percentage of the (new) total cost (after shipping and handling has been considered once), and add that in as part of the handling fee

should I make changes directly to the USPS module? everytime I try putting P% into the handling fee slot, it ignores the % and just treats it as the per-box rate.

Ajeh explains
/includes/modules/shipping/ups.php
Change the code to:
PHP Code:
$methods[] = array('id' => $type,
'title' => $this->types[$type],
'cost' => ($cost + ($cost * MODULE_SHIPPING_UPS_HANDLING)) * $shipping_num_boxes);
Then set the Handling to: .20
Here is the original thread: http://www.zen-cart.com/forum/showthread.php?p=802685

To add a percentage of the shipping cost to the shipping cost I came across to an answer from OS cart:
/includes/modules/shipping/ups.php

Close to line 180 change the line:
'cost' => ($cost + MODULE_SHIPPING_UPS_HANDLING) * $shipping_num_boxes);
to
'cost' => ($cost += ($cost *= MODULE_SHIPPING_UPS_HANDLING/100)) * $shipping_num_boxes);
Go to admin>modules>shipping>UPS Handling fee and add the percentage value you want.

It worked for me, I hope it works for you.

:lamo: