[ic] using percentage pricing with price groups

Eric Small interchange at ericsmall.com
Fri Jun 25 16:41:11 EDT 2004

Thomas J.M. Burton wrote:

> CommonAdjust    :price, pricing:price_group,q2,q4,q6,q8,q10,q12:, 
> ;:sale_price, ;$, ==:options
> AutoModifier   pricing:price_group
> PriceField     0

I've been working with CommonAdjust for the past day and think I have 
the hang of it now.  I'm not sure that you can have prices and discounts 
in the same table and have it work the way you want.

My first inclination would be to create another table called discounts 
and put just the discount percentages in there, while also removing them 
from the pricing table.

Then the CommonAdjust would be:
CommonAdjust    :price, ;pricing:price_group,q2,q4,q6,q8,q10,q12:, 
;:sale_price, ;$, ==:options, discounts:price_group,q2,q4,q6,q8,q10,q12:

Another possiblilty might be to try this before going with the separate 

CommonAdjust    :price, ;pricing:price_group,q2,q4,q6,q8,q10,q12:, 
;:sale_price, ;$, ==:options, pricing:price_group,q2,q4,q6,q8,q10,q12:

I'm not sure what will happpen if a percentage is returned as a price. 
This will probably work if Interchange rejects discount percentages as 
being a price.

Take note that the current location of :price will cause your quantity 
pricing to be skipped any time there is a value in products:price.  I 
personally would locate it between sale_price and $

Hopefully everything I told you is correct, but I'm still learning so I 
might be wrong in places.

Eric Small
Interchange 5.2.0 / Debian 3.0 Stable / PostgreSQL 7.4.1

More information about the interchange-users mailing list