[ic] Country variable lost when logging out

Kevin Walsh interchange-users@icdevgroup.org
Tue Nov 5 10:41:01 2002


Ed LaFrance [edl@newmediaems.com] wrote:
> > >
> > > If I log in and log out again, and then go to the checkout page, my 
> > shipping
> > > routine is not returning anything. I have found that this is because the
> > > [value country] variable that is normally passed to it is lost upon 
> > logging
> > > out. It will stay this way until I hit 'recalculate', change the 
> > country, or
> > > log back in, even if I go to another page and then come back to the 
> > checkout
> > > page.
> > >
> > You could modify your catalog.cfg to include this directive:
> >
> >     ValuesDefault  country  GB
> >
> > Where 'GB' is the default to be set (change to whatever you need).
> > The [value country] will be initialised with the default whenever a
> > new session is allocated.
> >
> But that doesn't solve the little problem he is describing, which is 
> logging out (which clears the country value) within the same session, then 
> returning to the checkout page. In that case, just add something like this 
> to the top of ord/checkout.html:
> 
> [value name=country set="[either][value country][or]US[/either]" hide=1]
> 
> ... you could also use the default country variable from the variable table 
> as the settor instead of 'US'
> 
I knew I must have misunderstood the question. It was all the logging
out and in that got me confused.

Logging out shouldn't clear the country value (or others) unless the
following is used:

    [userdb function=logout clear=1]

If you're doing that, and you don't want the values to clear, then
simply remove the "clear=1".  ValuesDefault will take care of the
initial default.  Perhaps "userdb clear" should restore the appropriate
defaults automagically, instead of simply deleting the values.

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