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: