[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date
][Minivend by thread
]
Re: Need help: checkout.html (II)
****** message to minivend-users from Ryan Hertz <rhertz@gyb.baits.com> ******
Yes, it looks like $a has null value until math is applied, making it zero.
At 10:51 AM 3/7/99 , you wrote:
>****** message to minivend-users from Oliver Schade
<schade@outsource.de> ******
>Hi again,
>[Customising checkout.html]
>
>> UserTag vat hasEndTag 1
>> UserTag vat Interpolate 1
>> UserTag vat Routine <<EOF
>> sub {
>> my ($a) = @_;
Isn't $_ the default passed, not @_ (an array?)
>> my $out ='';
>> my $vat = $a-$a/1.16;
How does $vat ever get passed out of the sub? Try $a = $a/1.16; Or put
$out .= "$vat"; instead of "$a";
>> $out .= '[currency]';
>> $out .= "$a";
>> $out .= '[/currency]';
>> return $out;
>> }
>> EOF
>>
>> and call with:
>> [vat][subtotal noformat=1][/vat]
>
>This even does not work :-(( Well, the facts:
>
> [vat][subtotal noformat=1][/vat]
>
>works and gives a number without any currency symbols.
>
> UserTag Routine sub { my ($a) = @_; return ($a); }
>
>works and returns just this unformatted number.
>
> UserTag Routine sub { my ($a) = @_; return ($a/100); }
>
>returns in every case 0.
>
> UserTag Routine sub { my ($a) = @_; return ($a-$a/1.16); }
>
>returns in every case 0.
>
> UserTag Routine sub { my ($a) = @_; local($b) = $a+100; return $b; }
>
>returns 100 (*argh*).
>
>Disabling UserTag Interpolate 1 has no effect. Is seems, that any arithmetic
>sets $a to zero... :-((( Any more ideas, please?
>
>Thanks for all other hints, most of them are working (expect this tricky
one).
>
>Ciao, Oliver
Good luck,
-Ryan
Ryan Hertz tel 520-645-3812
Webmaster tel 800-645-BAIT
Advertising Director fax 520-645-2588
Gary Yamamoto Custom Baits, Inc. http://www.yamamoto.baits.com
-
To unsubscribe from the list, DO NOT REPLY to this message. Instead, send
email with 'UNSUBSCRIBE minivend-users' in the body to Majordomo@minivend.com.
Archive of past messages: http://www.minivend.com/minivend/minivend-list