[ic] resetting user [profile]

Naomi Taylor interchange-users@icdevgroup.org
Thu Apr 10 10:33:00 2003


Hi all,

I scoured the docs and the list archives trying to figure out how to properly use this
very useful [profile] tag and there's one piece that I just can't figure out: how to
reset it after I change it.  I've set up profiles with unique CommonAdjusts named it,
dist1, dist2, and dist3 in my after.cfg along with a default CommonAdjust not in a
profile and all of my prices are working correctly for the right user type.  If a user
logs in whose price_level is dist1, their prices automatically use the dist1 profile's
CommonAdjust and it works perfectly.

The site is enticing regular users to join a price club by displaying what the price
would be if they joined the club.  So, some prices on the page are following the default
CommonAdjust and some need to use the it profile.  My plan for accomplishing this is to
change the profile to it, display the item/cart price using [subtotal] or [item-price],
then change the profile back.  Here are a few examples to show what works and where I run
into trouble ([profile] displays the current value, [profile myprofile] changes the
profile to myprofile) (#1 works as expected, #2 & #3 do not):

1) not logged in, this:
[profile]:[profile it][profile]:[profile dist1][profile]

results in this:
:default-it:default-dist1

2) reload page after changing that code to this:
[profile][tmp newprofile]it[/tmp]:[profile scratch newprofile][profile]

results in:
default-dist1:default-dist1

3) ultimately, I would like the code to look something like this (without the extra
debugging [profile] tags:
[tmp oldprofile][profile][/tmp][profile][profile it][profile][subtotal][profile scratch
oldprofile][profile]

but this results in:
default-dist1default-it$45.00default-it 

I want to be able to change the profile, then change it back using a variable or other
reset mechanism.  But [profile] doesn't accept "scratch oldprofile" or "[scratch
oldprofile]" or "[profile]oldprofile[/profile]" or "[profile  ]" or "[profile 0]".  Is
there a way to reset the profile to what it was before I changed it?  Your help is very
much appreciated.

thanks,
    Naomi

__________________________________________________
Do you Yahoo!?
Yahoo! Tax Center - File online, calculators, forms, and more
http://tax.yahoo.com