[ic] $ Discount Based on Subtotal

Sam Batschelet sam at westbranchresort.com
Fri Apr 3 14:44:47 UTC 2009

I am trying to deploy a discount structure that applies dollar discount
to the order based on the pretax total.  For example:

Save $20 if cart subtotal $150-$299
Save $40 if cart subtotal $300 -$499

Reading through the discount tag in Kevin RTFM seems like you could use
the $s variable in the code to set this with perl.  Just curious if
anyone has done this before seems most discount structures are based on
quantity or a strait %.  But I think something like this would work.  Am
I right to go this route vs CommonAdjust it doesn't seem to be what I
need.  Any advice/hrlp would be greatly appreciated.

[discount ALL_ITEMS]
    return $s if $s < 149.00;
    return $s - 20 if $s > 149.99 and $s < 299.99 ;
    return $s - 40 if $s > 299.99 and $s < 499.99 ;

Thanks in advance

More information about the interchange-users mailing list