[ic] make "dealer" with form

Kevin Walsh interchange-users@interchange.redhat.com
Tue Dec 18 12:36:01 2001


> I am trying to have a person be set as a dealer in userdb. When people "sign
> up" they use the account.html page that accesses the userdb values I want
> everybody that "signs up" with this form to be set as a "dealer".
> 
> To give you an idea of what I need to accomplish:
> 
> <INPUT TYPE=hidden NAME=dealer VALUE=yes>
> 
> <INPUT TYPE=hidden NAME=dealer VALUE=1>
> 
> I have tried a dozen others, however they seem embarrasing to post :)
> 
userdb.dealer is read in as a scratch value if you have based your
shop on the foundation demo, and haven't changed this setting.
Therefore, to set dealer accounts, you need to set the dealer
scratch and then call [userdb save].  Your dealer <input> value
will have no affect at all, whatever you set it to.

If you want to do this in account.html, then find this block of code:

    [set Save_database]
    [userdb save]
    [/set]

On or around line 66, and add a line to make this:

    [set Save_database]
    [set dealer]Yes[/set]
    [userdb save]
    [/set]

I would personally prefer the dealer value to be set on the
new_account.html page, as the first line of the [set NewAccount]
block of code.  You may need to set the value in etc/log_transaction
if you create accounts there that people actually use.

-- 
   _/   _/  _/_/_/_/  _/    _/  _/_/_/  _/    _/
  _/_/_/   _/_/      _/    _/    _/    _/_/  _/   K e v i n   W a l s h
 _/ _/    _/          _/ _/     _/    _/  _/_/    kevin@cursor.uk.com
_/   _/  _/_/_/_/      _/    _/_/_/  _/    _/