[ic] $ Discount Based on Subtotal

Carl Bailey carl at endpoint.com
Fri Apr 3 16:44:50 UTC 2009


On Apr 3, 2009, at 10:44 AM, Sam Batschelet wrote:

>
> 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
> etc
>
> 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 ;
> [/discount]
>
> Thanks in advance
> -Sam


Sam,

What you want here is [discount ENTIRE_CART]

If you use the above then $s is based on each line item of the cart.

Carl
. . . . . . . . . . . . . . . . . . .
Carl Bailey
t: 919-323-8025
carl at endpoint.com
. . . . . . . . . . . . . . . . . . .




More information about the interchange-users mailing list