[ic] handling charges

David Christensen david at endpoint.com
Mon Feb 11 20:51:27 EST 2008


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;


Cheers,

David Christensen
--
David Christensen
End Point Corporation
david at endpoint.com



On Feb 11, 2008, at 7:08 PM, Matthew Dell wrote:

> On 02/06/2008 11:03 AM, Matthew Dell wrote:
>> I have been trying to set a handling charge depending on how many  
>> items
> are
>> in the cart.  But when I set
>>
>> [if]
>> [item-quantity > 4]
>> [assign handling="20.00"]
>> [else]
>> [tmp my_handling]5[/tmp]
>> [tmp][perl]
>> $Scratch->{"total_handling"} = $Scratch->{"my_handling"} * $Items ;
>> [/perl]
>> [/tmp]
>>
>> [assign handling="[scratch total_handling]"]
>> [/else]
>> [/if]
>>
>> It doesn't work and I cannot figure out why.  I did set [assign
>> handling="20.00"] without the other stuff, but that would not add  
>> into the
>> order total.
>>
>> There are really two issues, getting the handling charge to  
>> calculate and
>> adding the handling charge to the order total.
>>
>> Any suggestions are appreciated.
>
> Lots of problems that I see, first off, $Items is an array reference,
> and does not contain an integer that you can just multiply by,  
> secondly
> you have to set the mv_handling value to a true value for handling to
> work, and thirdly that code is crap, try ...
>
>
> I will keep looking and working on this.
>
> Thanks
>
>
> M Dell
> Orlando, FL 32868
> mdell at inthesuntech.com
> http://www.inthesuntech.com
>
>
>
> _______________________________________________
> interchange-users mailing list
> interchange-users at icdevgroup.org
> http://www.icdevgroup.org/mailman/listinfo/interchange-users



More information about the interchange-users mailing list