New Zenner
- Join Date:
- Nov 2006
- Posts:
- 11
- Plugin Contributions:
- 0
Handling Fee as Percentage?
Is it possible to make the handling fee a percentage of the actual shipping cost?
Views: 22,068
New Zenner
Is it possible to make the handling fee a percentage of the actual shipping cost?
Oba-san
You can customize the Shipping Modules in any manner that you need ...
On Handling fees, you will see where the constant is used ... change it to treat that as a percentage of the shipping rather than an amount ...
New Zenner
Zen Cart 1.3.7
My client wanted to have a 20% handling fee. They are using UPS.
Here's what I did:
includes/modules/shipping/ups.php
changed this line:
'cost' => ($cost + MODULE_SHIPPING_UPS_HANDLING) * $shipping_num_boxes);
to:
'cost' => ($cost + ($order->info['subtotal'] * MODULE_SHIPPING_UPS_HANDLING)) * $shipping_num_boxes);
Then in admin: Modules >> Shipping >> UPS I set the handling to .2
New Zenner
jmcdog - this takes a percentage of the total order not a percent of the UPS shipping charge:
example.
Checkout total is $20.00
UPS ground is $5.00
You method adds $2 (assuming 10% handling) making shipping $7.00.
What I would like is take 10% of $5.00 making shipping now $5.50.
The problem I see is that a $200.00 order would pay $20 shipping even if the $20 and $200 order both weigh the same.
I tried to change some variables around in the ups.php but I am no PHP expert and seemed to always choose the wrong thing.
New Zenner
jmcdog:
Zen Cart 1.3.7
My client wanted to have a 20% handling fee. They are using UPS.
Here's what I did:includes/modules/shipping/ups.php
changed this line:
'cost' => ($cost + MODULE_SHIPPING_UPS_HANDLING) * $shipping_num_boxes);
> to:
> ```
'cost' => ($cost + ($order->info['subtotal'] * MODULE_SHIPPING_UPS_HANDLING)) * $shipping_num_boxes);
Then in admin: Modules >> Shipping >> UPS I set the handling to .2
I would like to charge handling fee to my zones rate and zone table rate. Handling fee would be 5% of my total order. it's similar to the above but how should i do the setting?
New Zenner
i can set handling fee for 5% from my subtotal, but how to set it if i want to charge 5% from subtotal as well as shipping?
eg.:
Subtotal $50
Shipping $10
Total $60
I want to charge handling base on $60
Oba-san
You would need to add the $cost into where the handling fee is calculated ...
New Zenner
Hello- Hope I'm not high jacking this thread but it seemed like the right place to post.
---v1.3.9.f
--- add module two modules by Numinux, Ajax quick checkout and fedex
The problem is it seems that my site adds $3 per line ordered as a handling fee-
If you order several items the handling fee gets out of hand.
here is my site
thanks
John
New Zenner
Found my problem-- under the order total module- it does not recognize the "%" sign- so it added $3 instead of 3%
does anyone know how to make it a percent?
John
Oba-san
Which Order Total Module are you trying to use a percentage in? :unsure:
New Zenner
I don't have a dedicated mod for the handling- I was referring to the order total- under "modules" for zencart
Admin-
modules-
order total-
handling fee-
but I still can't make it a percentage--
thanks
John
Oba-san
Where in the Modules ... Order Totals ... are you seeing a Handling Fee? :unsure:
The Handling Fees are in the Modules ... Shipping ... on each of the Shipping modules ... but you have me a bit lost here ...
Granted, I am only on my first cup of coffee and could be missing something ... but whatchu talk'n about willis? :blink:
New Zenner
Oba-san
I see you are using some sort of Add On for your Handling Fee and not the Handling Fee on the individual Shipping modules ...
Do you know what add on you are using?
New Zenner
Hey everyone sorry if I'm reviving this old thread but it covers the basis of my question. I'm rocking v 1.3.9h and im looking to do the % based handling fee for usps. I tried changing the code to what was suggested but to no avail.
So would there be any type of other fixes you guys would know of. By chance try and reply as soon as you can, as this is one of the last steps I have left to setting up the site. Thanks for you time and answers in advance.
Oba-san
What did you enter for the Handling Fee on USPS ...
What did you change the code to on the USPS shipping module? :unsure:
New Zenner
Well I figured it out:clap:
The finished result was two fold. For our Free Shipping we added a 3% charge for PayPal transactions and $2.75 handling charge to cover shipping overhead. For our USPS module (priority, express, international shipping and PayPal charges we added a 5% charge plus $1.70.
No need to have an additional "Handling Fee" on the Shipping Module, this formula by-passes that.
USPS Shipping:
/public_html/includes/modules/shipping/usps.php
insert " +($order->info['subtotal'] * .05 + 1.70) into Line 298
where ($order->info['subtotal'] is your subtotal price * percent + overhead shipping cost.
Orginal:
'cost' => ($cost * $shipping_num_boxes) + (MODULE_SHIPPING_USPS_HANDLING_METHOD == 'Box' ? MODULE_SHIPPING_USPS_HANDLING * $shipping_num_boxes : MODULE_SHIPPING_USPS_HANDLING) );
Updated:
'cost' => ($cost * $shipping_num_boxes) + ($order->info['subtotal'] * .05 + 1.70) + (MODULE_SHIPPING_USPS_HANDLING_METHOD == 'Box' ? MODULE_SHIPPING_USPS_HANDLING * $shipping_num_boxes : MODULE_SHIPPING_USPS_HANDLING) );
Free Shipping:
/public_html/includes/modules/shipping/freeoptions.php
insert "($order->info['subtotal'] * .03 + 2.75) +"
where ($order->info['subtotal'] is your subtotal price * percent + overhead shipping cost.
Orginal:
'cost' => MODULE_SHIPPING_FREEOPTIONS_COST + MODULE_SHIPPING_FREEOPTIONS_HANDLING)));
Updated:
'cost' => MODULE_SHIPPING_FREEOPTIONS_COST + ($order->info['subtotal'] * .03 + 2.75) + MODULE_SHIPPING_FREEOPTIONS_HANDLING)));
Hope this helps anyone else out there.
Oba-san
Thanks for the update that you have this working now and how you did it ... :smile:
New Zenner
Hey, I'm looking and I don't see any handling fee under this module. Is this an add on?
New Zenner
Unknowing:
Does this help?
John
Hello, I look under this module and I don't see any handling fee. Is this an add on?
Tell staff why this post should be reviewed.