[ic] CommonAdjust

Jonathan Clark jonc@webmaint.com
Mon, 16 Apr 2001 10:33:12 +0100


>
> I found this as the header in
> .../catalogs/storename/products/pricing.txt (in the 'construct' demo):
>
> q2      price_group     sku     q5      q6      q10     q12     q18
> 	1	        AP-S
>
> (That's really a tab there between price_group and sku)
>
> Does that mean that only those customers that I put into Price Group 1 get
> these prices? (Assuming that there are prices in some of those columns)
>

from the construct demo:

part of products:
sku       price wholesale  description
os28057c  13.99 11.00      10 penny nails
os28057a  14.99 12.00      16 penny nails

part of pricing:
sku       price_group  q2  q5  q10  q25  q100
os28057c  1                10  9
os28057a  1                11  10

extract from catalog.cfg:
>PriceField     price
>
>CommonAdjust   pricing:price_group,q5,q10: ;:wholesale ;$
>AutoModifier   pricing:price_group
>AutoModifier   products:gift_cert
>
>UserDB         default    scratch    dealer
>
>Autoload <<EOR
>[perl]
>    if($Scratch->{dealer}) {
>            $Config->{PriceField} = 'no_price';
>    }
>[/perl]
>EOR

user jdoe is a Dealer and so qty pricing is applied.

he buys one of os28057c and pays 11.00

he buys three of os28057c and pays 3x11.00

he buys three of os28057c and two of os28057a and pays 3x10.00 + 2x11.00
because the sum total qty on order in the price group (1) is 5.

> With the q2 in front of price_group, does that mean that everyone gets
> a break on a quantity of 2? (When there is an amount in there!)
>

I don't think the order of the columns is important. Chained pricing works
its magic using fields with 'q' and then the appropriate qty number for the
break, not any sort of column order. The way the construct demo is set up,
the q2 field is not used.

> I added to the Quantity columns, restarted the server and then went
> into the Admin interface and sure enough all of these new quantity
> options are in there.
>
> JC>>PriceField	nonexistant_field
> JC>>CommonAdjust
> pricing:q12,q15,q16,q18,q20,q48,q72,q75,q80,q96: ;:price
>
> Does this go into catalog.cfg?

Yes. That's where catalog specific directives live.

>
> I'm assuming that if this isn't plugged in somewhere with the exact
> same quantities as above, the customer won't get the price breaks, even
> if they are qualified?

yes, thats right.

HTH

Jonathan
Webmaint.