[ic] $Tag->discount() question.
Kevin Walsh
interchange-users@icdevgroup.org
Tue Oct 22 14:16:00 2002
>
> 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 documentation is correct. Your code will need to look a little
more like this:
$discount_amt = 5;
$Tag->discount({ code => 'ENTIRE_ORDER' }, "\$s - $discount_amt");
Or better still (more readable):
$discount_amt = 5;
$Tag->discount({
code => 'ENTIRE_ORDER',
body => "\$s - $discount_amt",
});
--
_/ _/ _/_/_/_/ _/ _/ _/_/_/ _/ _/
_/_/_/ _/_/ _/ _/ _/ _/_/ _/ K e v i n W a l s h
_/ _/ _/ _/ _/ _/ _/ _/_/ kevin@cursor.biz
_/ _/ _/_/_/_/ _/ _/_/_/ _/ _/