[ic] How to load a special profile by name?

Joachim Leidinger interchange-users@icdevgroup.org
Tue Jul 23 07:27:00 2002


Mike Heins wrote:
 > Quoting Joachim Leidinger (jojo@blackpoint.de):
 >
 >>Hi List,
 >>
 >>if I've a profile "myprofile" in after.cfg, how can I load that profile
 >>in my basket?
 >>
 >>For example:
 >>
 >>[if loadtheprofile eq 1]
 >>code to load the profile by name
 >>[/if]
 >>
 >>the cart stuff...
 >>
 >
 >
 > It normally happens when the user logs in and their price_level
 > is set to "myprofile".

Ok!

 > I think if you examine the profile tag you would find what you want.
 > My guess:
 >
 > 	[profile tag=myprofile]

Yes, that is what I want. But it seems to me, it works only, if an user
logs in and has a "myprofile" in his price_level. But I've a problem. I
want to get the profile "myprofile" loaded with the following setting
from after.cfg

--------- snip ---------
Profile Haendler <<EOR
{
          CommonAdjust => <<EOF,
                  ;:HEURO1,HEURO10,HEURO20,
EOF
}
EOR
--------- snip ---------

if an user *is* not logged in! Short summary! I've 3 kind of users.

a)
An user logs in as a normal user without any content in price_level (not 
a dealer)
b)
An user logs in as a dealer with Haendler in price_level
c)
An user go into the shop as a anonymous dealer and use a special form page.

User a) and b) *is* logged in. User c) is not logged in and after using 
the special form page, a special scratch variable is set and mark that 
user as a dealer.

With my setting of after.cfg and catalog.cfg, it works very well with 
all kind of users, who is logged in. But it is not working with the user 
  of c). With [profile tag=myprofile], I get

Vend::Interpolate:debug: in tag_profile= opt={'reparse' => "1",'tag' => 
"Haendler",}

and the wrong price (price for the normal user and not the price for the 
dealer = Haendler).

An user of c) call a special IC page (form page) and has to insert a 
special password for an anonymous dealer. Because, my client distribute 
a special catalog with the special password to all pontential user of 
his shop. That potential user is known as a dealer. That kind of user 
(dealer) use the special password to get known something about the shop 
and the services of my client. If the potential user want to be a 
permanent taker of the shop, he will get a newest account from my client 
  as a dealer with Haendler in price_level.

I want to use any kind of [profile xyz] to get myprofile loaded as a 
dealer, who is logged in. For example with

Vend::Interpolate:debug: in tag_profile=default-Haendler opt=""
Vend::Interpolate:debug: running profile=Haendler tag=default
Vend::Interpolate:debug: found profile=Haendler
Vend::Interpolate:debug: restored profile
Vend::Interpolate:debug: doing profile CommonAdjust
Vend::Interpolate:debug: profile value=
                 ;:HEURO1,HEURO10,HEURO20,
, string=
Vend::Interpolate:debug: set CommonAdjust to value=
                 ;:HEURO1,HEURO10,HEURO20,
, string=

for a special user as a dealer, who is not real logged in. For example

[if scratch anonymousdealer]
[profile tag=Haendler]
[/if]

How can I solve it? How can I set the profile value to HEURO1, HEURO10 
and HEURO20 for such kind of "not logged in dealer"?

Thank you very much for your hints, helps and suggestions.

Joachim

-- 
Hans-Joachim Leidinger | Dipl.-Phys.Ing. Entwicklung eCommerce
[leidinger@bpanet.de]
Black Point Arts Internet Solutions GmbH
http://www.bpanet.de