Zen Cart Logo
Forums / Built-in Shipping and Payment Modules / percentage (%) based handling charge

percentage (%) based handling charge

Locked

Views: 1,107

Results 1 to 4 of 4
This thread is locked. New replies are disabled.
28 Jun 2008, 5:46 PM
#1
polarbear avatar

polarbear

New Zenner

Join Date:
Jun 2008
Posts:
9
Plugin Contributions:
0

percentage (%) based handling charge

I have searched through the eStart book, this forum, and Google and still can't find the answer.

What I am trying to do is set the handling fee as a percentage.

I imagine if I can find the code that does the math: shipping + handling = S&H total and change it to shipping * handling = S&H total it would allow me to input 0.40 and that would give me a percentage based handling price.

Of course this is only theory. Am I on the right track? If so, where in the files might I be able to find where the calculation is being made?

I am trying to wind up this project this weekend so any help you can offer within the next couple of days would be greatly appreciated.

thank you!

29 Jun 2008, 2:36 PM
#2
stevesh avatar

stevesh

Black Belt

Join Date:
Feb 2005
Location:
Lansing, Michigan USA
Posts:
19,793
Plugin Contributions:
2

Re: percentage (%) based handling charge

It looks like you'd have to make changes in each shipping module.

If you use the Developers Tool Kit and search for 'handling' you'll see a pretty small list of files where that stuff is done.

29 Jun 2008, 2:46 PM
#3
polarbear avatar

polarbear

New Zenner

Join Date:
Jun 2008
Posts:
9
Plugin Contributions:
0

Re: percentage (%) based handling charge

Ok, thanks for that tip.

But if my client is ONLY offering UPS, does that still mean I have to make those changes in all the files?

I will start to look into it and let you know what I find. Thanks.

29 Jun 2008, 3:14 PM
#4
polarbear avatar

polarbear

New Zenner

Join Date:
Jun 2008
Posts:
9
Plugin Contributions:
0

Re: percentage (%) based handling charge

Thanks Stevesh!

I found this line:

'cost' => ($cost + MODULE_SHIPPING_UPS_HANDLING) * $shipping_num_boxes);
``` in my UPS module on line 181

and changed it to:

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


And that seems to do the trick... at least if what I remember from math class is right =P