[ic] UPS Additional shipping calculation

Kestutis Lasys interchange-users@lists.akopia.com
Tue May 8 11:17:00 2001


> > I am 99.7% positive I am doing this correct, but here it is anyhow -
> > 
> > In the user interface: Shipping options: edit method upsg (the default UPS
> > Ground in Construct Something) to add an additional percentage to the total
> > shipping cost I have tried the following:
> > 
> > Additional shipping calculation:
> > x = x + (x * .85)
> > x = x + ( x * .85 )
> > x=x+(x*.85)
> > x = x  * 1.85
> > and so on......
> > 
> > Nothing seems to change this caculation
> > 
> > Any ideas? Is it a bug - according to the docs this is how it is done - just
> > won't work for me.
> 
> Bug in the docs. For the internal UPS calculation, all you can do
> is add some fixed number.
> 
> If you use the external lookup, you could do "* .85" and it should
> work.

Hello, 

I am just interesting how it should work?

That is still written in the user interface help:
------------------
"You can enter any valid mathematical expression 
and you can reuse the "x" variable as many times 
as you need to ..."  
... 
"even a UPS weight based calculation"
...
"It is important to note that you must specify some 
sort of equality on the left hand side of the equation."
------------------

Mike wrote: 
"For the internal UPS calculation, all you can do is add some fixed
number".

In program: Interpolate.pm
-------------------------------------------------
                        return '' if $final == 0;
                        $o->{adder} =~ s/\bx\b/$final/g;
                        $o->{adder} =~ s/\@\@TOTAL\@\\?\@/$final/g;
                        $o->{adder} = $ready_safe->reval($o->{adder});
                        $final += $o->{adder} if $o->{adder};
                        $final = POSIX::ceil($final) if
is_yes($o->{round});
--------------------------------------------------
i.e. you can use any valid mathematical expression, 
but without left hand side of the equation.

Sorry, if I miss something.

Kestutis Lasys