[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date
][Minivend by thread
]
Re: [mv] If statement, comparing a scratch vairable with a numeric
At 10:06 PM 12/17/1999 , you wrote:
>****** message to minivend-users from "KEVIN LYONS"
><kclyons@silvernet.net> ******
>
>Trying to make a simple case statement, because I cant get [include [scratch
>textfile]] to work. So I want to make a comparison and then include the
>proper file...but I am having a hard time with the syntax, so here is my try
>that does not work...
>
>[if var=1]
> do some stuff.....
>[else if var=2]
> do some other stuff
>[/if]
I suppose you're setting the scratch correctly:
[set lastproduct][item-code][/set]
[set mv_put_session]Yes[/set]
And then putting it into the session if it is to be used in another page.
Then, you could conditional as such:
[if scratch lastproduct]You were just looking at this: [scratch lastproduct]
[/if]
Or maybe something like this:
[if explicit]
[condition]
$last = '[scratch lastproduct]';
return 1 if $last eq "11-20";
return 0;
[/condition]
You were just looking at 11-20, I think that you should buy this too..
[else]
Before you buy this product, take a look at 11-20
[/else]
[/if]
There is always MTOWTDI (more than one way to do it) -- scour that MANUAL
and try every example until you find one that works. :-) If that fails,
dig the mailing list.
>Any help?
>Thanks
>
>Kevin Lyons
>kclyons@silvernet.net
>
>-
>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