[ic] if-statement for "dealer" field in userdb?

Ton Verhagen tverhagen at alamerce.nl
Fri Sep 26 11:08:44 EDT 2003


Quoting Quoting "Xavier GILLET" <xavier.gillet.perso at wanadoo.fr>:

>----- Original Message -----
>From: "Ton Verhagen" <tverhagen at alamerce.nl>
>To: <interchange-users at icdevgroup.org>; "Xavier GILLET"
><xavier.gillet.perso at wanadoo.fr>
>Sent: Friday, September 26, 2003 8:59 AM
>Subject: Re: [ic] if-statement for "dealer" field in userdb?
>
>
> > Quoting "Xavier GILLET" <xavier.gillet.perso at wanadoo.fr>:
> >
> > >[tmp dealer][data table=userdb field=dealer key="[data session
> > >username]"][/tmp]
> >
> > In foundation you normally wouldn't need to search for
> > the dealer field of the logged in user. As the value of the
> > dealer field will be assigned automatically to a scratch
> > variable 'dealer'.
> >
> > See catalog.cfg:
> > UserDB    default    scratch       "dealer price_level credit_limit"
> >
> >
> >
> > So the code below would suffice.
> >
> >
> > >[if scratch dealer]
> > >*
> > >*
> > >*
> > >[else]
> > >*
> > >*
> > >*
> > >[/else]
> > >[/if]
> >
> > Good luck !
> >
> >
> >
> > Best regards,
> >
> > Ton
> >
>
>I think you need to use [value] and not [scratch] variable in this case :
>
>[if value dealer]
>*
>*
>*
>[else]
>*
>*
>*
>[/else]
>[/if]

Xavier, I think you are a bit mistaken.

It is not a good idea to put the value of the dealer field in
a form variable. Doing so would enable a user to change
the value by simply posting a form.

That's the reason why it is put in a scratch variable. Scratch
variables cannot be altered by users of the catalog/website.

And again, the value of the dealer field in the userdb will be
assigned automatically to the scratch variable dealer, when
a user logs in.




Best regards,

Ton

--
Alamerce Nederland --- Cornerstone of eBusiness
Phone +31-40-2374381    info at alamerce.nl    http://www.alamerce.nl

eCommerce Solutions -- Consulting -- Website & Interchange Hosting 



More information about the interchange-users mailing list