[ic] "dealer" pricing

Jonathan Clark jonc at webmaint.com
Fri Jul 18 22:21:26 EDT 2003


> > > IC 4.8.3
> > >
> > > Still working on discounting.  Due to problems with the
> > home-brew system,
> > > I'm trying the standard dealer pricing scheme found in IC.  I
> > am using an
> > > external script to compare expiration dates and update a flag in the
> > > database "user_active" to determine if someone is a member or
> > > not.  Now I'm
> > > getting the "zero price" thing that I see people talk about.  Not
> > > sure why.
> > >
> > > Here's my old catalog.cfg for pricing:
> > > --------------------------------------------------
> > > PriceField     CommonAdjust
> > >
> > > CommonAdjust   pricing:price_group,q3,q4,q5,q10, ;products:price, ;$
> > > AutoModifier   pricing:price_group
> > > AutoModifier   products:gift_cert
> > >
> > > NonTaxableField nontaxable
> > >
> > > UserDB         default    scratch    dealer
> > >
> > > Autoload <<EOR
> > > [perl]
> > >     if($Scratch->{dealer}) {
> > >             $Config->{PriceField} = 'no_price';
> > >     }
> > > [/perl]
> > > EOR
> > > --------------------------------------------------
> > >
> > > Here's my new one:
> > >
> > > --------------------------------------------------
> > > PriceField     CommonAdjust
> > >
> > > AutoModifier pricing:price_group
> > > AutoModifier gift_cert
> > > FractionalItems No
> > >
> > > Profile user_active <<EOR
> > > {
> > >         CommonAdjust => <<EOF,
> > >                 pricing:price_group,q3,q4,q5,q10,
> > > ;products:member_price, ;$
> > > EOF
> > >         NonTaxableField => 'nontaxable'
> > > }
> > > EOR
> > >
> > > Profile default CommonAdjust   "pricing:price_group,q3,q4,q5,q10,
> > > ;products:price, ;$"
> > > Profile default NonTaxableField
> > > Profile default PriceField 0
> > > --------------------------------------------------
> > >
> > > Any clues as to why I'm gettin the zero price thing?  There's no
> > > etc/after.cfg script to modify these settings.
> >
> > When are you getting the zero price? (dealer logged in or non-dealer?)
> >
> > You have:
> >
> > PriceField     CommonAdjust
> >
> > You should make this something which is not the name of a field in your
> > products table, in the default profile its '0' - I take it you
> > don't have a
> > field called 'CommonAdjust'?
> >
> > You didn't mention it, do you still have the Autoload?
> >
> > Jonathan.
>
> Dear Jonathan,
>
> Ok, I removed the PriceField CommonAdjust line, and I was able to get
> prices, but they didn't change for dealers, or for quantities.  Then I
> changed it to PriceField 0 and the prices went to zero again.  I'm getting
> the zero price with non-logged-in, non-dealer logged in, and dealer logged
> in.
>
> Not sure what the Autoload is?

Autoload is a block of ITL code which is run at the top of every page. You
had:

Autoload <<EOR
[perl]
    if($Scratch->{dealer}) {
            $Config->{PriceField} = 'no_price';
    }
[/perl]
EOR

..which would effectively enable the CommonAdjust pricing by unsetting the
PriceField (setting it to a non-existant field) when the 'dealer' scratch
variable is set. This scratch is loaded from the logging in user's userdb
field because of this directive:

UserDB    default    scratch       "dealer price_level credit_limit"

..however you did have a PriceField directive as well which would override
the PriceField setting anyway.

Your CommonAdjust directive appears to not be working at all. When you
remove the PriceField directive, you are telling IC to use the field 'price'
in the products table, which obviously does have prices in it.

On second look, you have set up CommonAdjust in some profiles, but not a
default one. AFAICT, profiles appeared in the 4.9 catalog.cfg but not in
4.8, which you are running. I suggest you add:

CommonAdjust   "pricing:price_group,q3,q4,q5,q10,;products:price, ;$"

..and remove the Profile stuff. On a restart, this should give you
CommonAdjust pricing all the time. Then remove the PriceField directive and
add in the autoload. This should put you back to dealers get CommonAdjust,
everyone else gets regular price.

Jonathan.


--
Jonathan Clark
Webmaint.com - Building Clever Websites   http://www.webmaint.com/
Webmaint.net - Business Web Hosting       http://www.webmaint.net/




More information about the interchange-users mailing list