[ic] pricing help needed

Peter peter at pajamian.dhs.org
Thu Mar 17 17:19:40 EST 2005

On 03/17/05 10:29, Mark Weaver wrote:
> Hi All,
> I've got a client, that when I first setup interchange for them they 
> wanted an across the board discount. So, I set this up for them; it 
> affects every item in inventory. Now, they've discovered that this 
> discount rate when applied to a few certain products is a "bad" thing 
> and want to excempt this particular product from the global discount 
> rate, and apply a lesser discount to only these items.
> My method for applying the global discount is thus:
> PriceField      0
> #AutoModifier   pricing:price_group
> CommonAdjust    products:price, -50%, pricing:q2,q10,q25,q50,q100, 
> ;products        :price, ;$
> What would be the best solution for applying a 20% discount to the items 
> that they're wanting excluded from the global discount?

You will need to modify this, but here's what I did when the client 
wanted a 20% off everything sale with the exclusion of a few items:

CommonAdjust    :sale_price, ;:price, ;$, ==:options, 
"&($item->{code}=~/^(?:FM|WS(?:30|35|40|45))/ ? 0 : '-20%')"

You could easily modify that to adjust for 20% or 50% based on your own 
list of skus, or even add another field to the products db called 
commonadjust and adjust by that directly or just flag ceartain items in 
that field or whatever.


More information about the interchange-users mailing list