[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date
][Minivend by thread
]
RE: i need help with a pricing scheme
At 10:17 PM 9/2/99 , you wrote:
>****** message to minivend-users from "kenshin"
<kenshin@planetanime.com> ******
>
>This works like a charm :) thanks... except i use it inside an [on-change]
>and the [else] that is associated with it conflicts with the else in my [if
>scratch result].
I've had similar problems on occasion -- maybe that's why I didn't use any
[else] statements.... hmm....
Worst case scenario? You could test to see if your scratch was null, then
it would be your 'else'. *shrug*
>
>it looks something like this:
>[search-list]
>[on-change cat]
> [condition][item-field category][/condition]
> [perl arg=scratch]
> my $test1 = q{[loop-field foo]} eq 'this';
> my $test2 = q{[loop-field bar]} eq 'that';
> $Safe{scratch}{result} = $test2 || $test1;
> return '';
> [/perl]
>
> [if scratch result]
> consequence...
> [else]
> stuff
> [/else]
> [/if]
> [else]
> [perl arg=scratch]
> my $test1 = q{[loop-field foo]} eq 'this';
> my $test2 = q{[loop-field bar]} eq 'that';
> $Safe{scratch}{result} = $test2 || $test1;
> return '';
> [/perl]
>
> [if scratch result]
> consequence...
> [else]
> stuff
> [/else]
> [/if]
> [/else]
>[/on-change cat]
>[/search-list]
>
>Is there a way of doing nestled if/else's so all the else's don't confuse
>each other?
>
>thanks,
>mike k.
>
>
>>
>> The best way to do things like this is:
>>
>> [perl arg=scratch]
>> my $test1 = q{[loop-field foo]} eq 'this';
>> my $test2 = q{[loop-field bar]} eq 'that';
>> $Safe{scratch}{result} = $test2 || $test1;
>> return '';
>> [/perl]
>>
>> [if scratch result]
>> consequence...
>> [/if]
>>
>> This will be a lot less labored in MV4, believe me. More soon..
>
>-
>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
>
Ryan Hertz tel 800-645-BAIT
Webmaster fax 520-645-2588
Advertising Director http://www.insideline.net
Gary Yamamoto Custom Baits, Inc. http://www.yamamoto.baits.com