[ic] $Tag->discount() question.

Stefan Hornburg interchange-users@icdevgroup.org
Wed Oct 23 05:09:01 2002


On Tue, 22 Oct 2002 10:34:36 -0400
"Jason Korkin" <jkorkin@korksoft.com> wrote:

> Hi,
> 
> Using Interchange 4.8.6.
> 
> Trying to setup a usertag using the discount tag... Essentially this is
> what I have, however, it doesn't produce anything -- no logs to the
> error.log for either the catalog or the server files.
> 
> $discount_amt = 5;
> $Tag->discount({ code => 'ENTIRE_ORDER', }, {$s - $discount_amt});
> 
> Based on the documentation the format should be:
> 	
> 	$Tag->discount(code=>value, BODY)
> 

The BODY is a formula evaluated at runtime with $s as variable, so you
need to quote it, e.g.

$Tag->discount('ALL_ITEMS', "\$s - (\$s * $dc)");

Ciao
       Racke