[ic] breaking down in tears

Ed LaFrance edl@newmediaems.com
Wed, 21 Feb 2001 10:27:27 -0800

At 07:11 PM 02/21/2001 +0100, you wrote:

>UserDB         default    scratch    dealer
>Autoload <<EOR
>     if($Scratch->{dealer}) {
>             $Config->{PriceField} = 'no_price';
>     }
>Hello everybody,
>i have inserted 3 new price fields in the userdb.txt called 
>our dealers have 3 different pricegroups (preisstaffel - field in the 
>userdb.txt containing either 2,3,4)
>I would like to change the config.txt in such a way that it would change 
>automatically the PriceField
>according to the pricegroup(preisstaffel) in the userdb.txt [price2 --> 
>pricegroup2 ... price3--> pricegroup....]
>thing is i do not know a great deal about pearl and i am basically 
>breaking down in tears since I tried for the last 4 hours
>and i just cant get it. can somebody please help me

What you need is three price fields in products.txt - lets call them 
price2, price3, price4.  Then you need a price selection field for the 
dealer in userdb.txt - lets call this pricefield.  It would contain the 
full name of the price field to use for that dealer (price2, price3 or price4).

Then you can do this:

Autoload <<EOR
     if($Scratch->{dealer}) {
             $Config->{PriceField} = $Values->{pricefield};

...if you need to do anything more complicated, use CommonAdjust.

- Ed L.

>regards joe-
>US Video Center Medien GmbH
>Heimsheimer Str 22
>70499 Stuttgart
>Tel 0711 880252 0
>Fax 0711 880252 22
>Email joachim.richter@usvideocenter.de
>Interchange-users mailing list