[ic] resetting user [profile]

Naomi Taylor interchange-users@icdevgroup.org
Thu Apr 10 12:44:03 2003


--- Mike Heins <mike@perusion.com> wrote:
> Quoting Naomi Taylor (naomi_koppel@yahoo.com):
> > 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]
> 
> I don't know where you got the idea you could just put "scratch newprofile"
> anywhere you want and get that back.
> 
> 	[profile name="[scratch newprofile]"]
> 
> would be what is needed.

Thank you!  Since I couldn't find any documentation on this tag, I did not know what the
named attributes might be so I tried positional.  [profile [scratch newprofile]] resulted
in ] showing up on the page.  So I tried without the brackets.  Seemed logical since it
works for [if].  Anyway, where I get my non-working ideas isn't important, working
towards a solution here...

I tried this new improved code:
[tmp oldprofile][profile][/tmp][profile]:[profile it][profile]:[subtotal]:[profile
name="[scratch oldprofile]"][profile]

and got this result:
:default-it:$8.00:default-itdefault-it 

Your new code works in cases such as #2 above, where the new profile is named with a
non-null literal, but it doesn't work when the profile is previously null.  Also, I'm not
sure where that "default-" is coming from.  It doesn't come from the name of the profile,
and I can't set a new profile as [profile default-it].  It's ignored.  Any ideas?

thanks again for your help.

--Naomi

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