[ic] handling charges

Peter peter at pajamian.dhs.org
Mon Feb 11 22:03:53 EST 2008


On 02/11/2008 05:59 PM, Peter wrote:
> On 02/11/2008 05:51 PM, David Christensen wrote:
>> Matthew,
>>
>>> [calcn]
>>>     $Values->{mv_handling} = 1;
>>>
>>>     my $handling = scalar @$Items * 5;
>>>     $handling = 20 if $handling < 20;
>>>
>>>     $Tag->assign({ handling => $handling });
>>>
>>>     return;
>>> [/calcn]
>>
>>> Actually Peter, this gives me only $20 for handling no matter how 
>>> many items
>>> there are in the cart.  It should be $5 per item up to $20.
>>
>> It looks like there's a minor typo in the code; it should be:
>>
>>>     $handling = 20 if $handling > 20;
> 
> No typo there, it should be <.

Oh sorry, I just re-read what you said, David is right.  I misunderstood 
your requirement, thought it as $5 per item with a *minimum charge* of 
$20.  Yes, swap the < for a > and you'll be fine.

Peter



More information about the interchange-users mailing list