[ic] pricing help needed

Mark Weaver mdw1982 at mdw1982.com
Thu Mar 17 20:11:53 EST 2005


Peter wrote:
> 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.
> 
> Peter

Hi Peter,

This looks like just what I'm looking for. I was wondering if you could 
walk me through your regex. I've never seen one like this before and i'm 
not sure exactly what its saying.

-- 
Mark
-----------------------------------------------------------
Paid for by Penguins against modern appliances(R)
Linux User Since 1996
Powered by Mandrake Linux 8.2, 10.0 & RH Fedora Core 3


More information about the interchange-users mailing list