[ic] Setting price_level on the fly erratic?

Bruno Cantieni interchange-users@interchange.redhat.com
Mon May 13 07:53:00 2002


I'm setting up a store where users have a choice to browse the catalog showing the retail pricelist
or
the dealer pricelist.
Users can apply for  "dealer" status with a simple signup form. They are automatically granted
dealer status via

[set Save_database]

[set dealer]1[/set]

[set price_level]dealer[/set]

[userdb save]

[/set]

This part works fine.

We don't log the user in, we just set up the account and issue a "dealer" password which we
periodically change and subsequently only send it out to "qualified" dealers.

When they attempt to log in, they need to supply this dealer password along with the regular
username
and password and if the dealer password is correct, they will see the dealer prices.
I would have liked to make this part of the Login profile in profiles.login by doing something like:

__NAME__ Login

[if value dealer_password ne __DEALER_PASSWORD__]

[set price_level][/set]

[set dealer][/set]

[userdb save]

[else]

[set dealer]1[/set]

[set price_level]dealer[/set]

[userdb save]

[/else]

[/if]


[snip][/snip]

__END__

Setting "dealer" this way works.

Setting "price_level" this way does not work.

Both are supposed to be scratch vars as defined by the

UserDB default scratch "dealer price_level credit_limit"

directive in catalog.cfg

Can anyone shed light on this??

Thanks,

Bruno



###########################################
Bruno Cantieni
Digital Landscape - Cyboretum.com
Web Applications * Web Hosting * e-Commerce
http://www.digi-land.com
http://www.cyboretum.com
bruno@digi-land.com
Phone/Fax: 905.668.2255