[ic] discount item if total >= 150

Joshua Lavin joshua at kingdomdesign.com
Mon Apr 19 12:01:24 EDT 2004

On Apr 16, 2004, at 3:19 PM, Jeannie Stevenson wrote:

> hello listies
> I'm having a problem getting the discount to display correctly in the 
> cart.
> I can get it discount but it seems to not want to evaluate the total 
> and
> then apply the discount if the evaluation is true.
> in the basket cart component I've tried...
> [discount ENTIRE_ORDER][/discount]
> [set discountamt][/set]
> [assign clear=1]
> [tmp dis_dlr][subtotal noformat=1][/tmp]
> [if scratch dis_dlr >= 140]
> [seti discountamt][scratch dis_dlr] - 99 [/set]

Your closing tag should be [/seti].

> [discount DLR] $s - $Scratch->{discountamt}[/discount]

I may be wrong, but I don't think you can put perl code in an ITL tag, 
unless it's [calc] or [perl].

This is what I'm using to evaluate subtotal in the cart ($50 or more 
gets $1 shipping, $100 or more gets free):

[if term="[subtotal noformat=1]" op="<" compare="50"]
   <p>Add <b>[currency][calc]50 - [subtotal 
noformat=1][/calc][/currency]</b> to your order to get <b>[page 
shipping]$1 shipping!</a></b></p>
[elsif term="[subtotal noformat=1]" op="<" compare="100"]
   <p>Add <b>[currency][calc]100 - [subtotal 
noformat=1][/calc][/currency]</b> to your order to get <b>[page 
shipping]free shipping!</a></b></p>

Josh Lavin
Kingdom Design   http://www.kdw.us/

More information about the interchange-users mailing list