[ic] pricing help needed

Peter peter at pajamian.dhs.org
Fri Mar 18 10:04:44 EST 2005


On 03/18/05 06:43, Mark Weaver wrote:
> Here's what I've got now for the CommonAdjust directive:
> CommonAdjust    products:price, -50%, ;$,
> ==products, "&($item->{prod_group}=~/Gifts/ ? 0 : '-20%')"
> 
> The problem I'm running into is that "first" it applies the 50% discount 
> to the item's retail price and then applies the 20% discount on top of 
> that. I'm still working on wraping my brain around everything thats 
> going on with CommonAdjust, atoms and the like, so its not all making 
> sense yet.
> 
> At any rate, now for all items who have a prod_group value of "Gifts" 
> I've got a 70% discount happening. Might you have an idea where I'm 
> going wrong?

Take out the first -50% and replace the 0 in your if operation with it 
(the ( ... ? ... : ... ) is an if statement).

Peter


More information about the interchange-users mailing list