[ic] discount tag

Michael Goldfarb interchange-users@icdevgroup.org
Fri Jun 14 13:15:01 2002


-----Original Message-----
From: interchange-users-admin@icdevgroup.org
[mailto:interchange-users-admin@icdevgroup.org] On Behalf Of Kevin Walsh
Sent: Friday, June 14, 2002 10:01 AM
To: interchange-users@icdevgroup.org
Subject: RE: [ic] discount tag

> 
> Is there any way to use a variable with the [discount] tag?
> 
> For instance, I would like to discount an entire order by a dollar
amount 
> that is held by a scratch variable.  I have been trying something
like:
> 
> [discount ENTIRE_ORDER] $s - [scratch VARNAME] [/discount]
> 
> I have looked at the docs and the only examples that I have seen use
an 
> integer instead of a variable.
> 
You have two choices:

1) Evaluate the "varname" scratch when the discount is defined:

[discount code="ENTIRE_ORDER" interpolate=1]$s - [scratch
varname][/discount]

2) Evaluate the "varname" scratch when the discount value is calculated:

[discount ENTIRE_ORDER]$s - $Scratch->{varname}[/discount]


Thanks Kevin!

Worked perfectly as always :)



-- 
   _/   _/  _/_/_/_/  _/    _/  _/_/_/  _/    _/
  _/_/_/   _/_/      _/    _/    _/    _/_/  _/   K e v i n   W a l s h
 _/ _/    _/          _/ _/     _/    _/  _/_/    kevin@cursor.biz
_/   _/  _/_/_/_/      _/    _/_/_/  _/    _/

_______________________________________________
interchange-users mailing list
interchange-users@icdevgroup.org
http://www.icdevgroup.org/mailman/listinfo/interchange-users