[Date Prev][Date Next][Thread Prev][Thread Next][Interchange by date
][Interchange by thread
]
[ic] $Tag->discount() question.
>
> 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
_/ _/ _/_/_/_/ _/ _/_/_/ _/ _/