[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date
][Minivend by thread
]
Re: i need help with a pricing scheme
Quoting kenshin (kenshin@planetanime.com):
> >
> > [if explicit]
> > [condition]
> > $currently = '[loop-field category]';
> > return 1 if $currently eq "apparel";
> > return 0;
> > [/condition]
> > <TABLE WIDTH="80%"><TR BGCOLOR="blue"><TD ALIGN=CENTER><BR><FONT
> > COLOR="white"><H2>Apparel</H2></FONT></TD></TR></TABLE>
> > [/if]
> >
>
> I do something similar to this but do you know how i would add more
> if/else/thens inside this [if]?
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...
--
Mike Heins http://www.minivend.com/ ___
Internet Robotics |_ _|____
131 Willow Lane, Floor 2 | || _ \
It's a little-known fact Oxford, OH 45056 | || |_) |
that the Y1K problem caused <mikeh@minivend.com> |___| _ <
the Dark Ages. -- unknown 513.523.7621 FAX 7501 |_| \_\