Akopia Akopia Services

[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date ][Minivend by thread ]

Re: [mv] Newbie "IF" statement - FIXED!



******    message to minivend-users from Shawn Butler - Blue Planet Corp <postmaster@thetechpage.com>     ******

Thanks! That worked!

On Wed, 22 March 2000, jojo@buchonline.net wrote:

> 
> ******    message to minivend-users from jojo@buchonline.net     ******
> 
> On 22 Mar, Shawn Butler - Blue Planet Corp wrote:
> > ******    message to minivend-users from Shawn Butler - Blue Planet Corp <postmaster@thetechpage.com>     ******
> > 
> > Im going crazy here trying to figure out
> > a simple "IF" Statement.
> > 
> > I made a UserTag that works great, it looks
> > like this:
> > UserTag ulnadmin   Interpolate
> > UserTag ulnadmin   Routine <<EOR
> > sub {
> >   my @ulnemployes;
> >   @ulnemployes = ('shawn','dan');
> >   foreach (@ulnemployes) {
> >     if ($_ eq Vend::Util::read_cookie('MV_USERNAME')) { 
> >       return "Yes";
> >       } else { return "No"; }
> >   }
> > }
> > EOR
> > 
> > So, when I put the [ulnadmin] tag in the middle
> > of the page, and shawn is logged in, I get "Yes"
> > printed to the page. Perfect.
> > 
> > But when I try to put it in a "IF" statement in
> > the very same page like this: [if [ulnadmin] eq "Yes"] 
> > the "if" never evals as true. I tried putting 
> > [ulnadmin] in quotes too, same thing.
> > 
> > Anyone know what Im doing wrong? Probably something
> > simple.
> 
> How about
> 
> [set name="cookiedo" interpolate=1][ulnadmin][/set]
> 
> [if scratch cookiedo eq Yes]
> Hello.....
> [/if]
> 
> ?
> 
> Regards,
> 
>     Joachim
> -- 
> Hans-Joachim Leidinger
> buch online                 jojo@buchonline.net
> Munscheidstr. 14            FAX: +49 209 1971449
> 45886 Gelsenkirchen         FAX: 0209 1671449
> 
> -
> 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


-
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


Search for: Match: Format: Sort by: