[ic] Discount an item to zero?

Dan Bergan danb at berganconsulting.com
Thu May 22 22:03:49 UTC 2008


On Thu, May 22, 2008 at 4:34 PM,  <ic at 3edge.com> wrote:
> Dan Bergan writes:
>
>> I am trying to discount an item to zero (with a coupon code).  The
>> discount tag is working fine in all cases except when I try to set the
>> price to zero.
>>
>> Am I missing something, or can I not set a product to be free using
>> the discount tag?
>>
>> [discount code="[scratch discount_item]" interpolate=1][calc][scratch
>> discount]*$q[/calc][/discount]
>
>  - Do you get any error messages in any logs?

No errors.

>  - If you print [scratch discount_item]  and [scratch discount] above the
> [discount] tag, does it show the values you expect?

Yes, they are correct.

>  - Have you tried to just use Perl instead of the [calc] block?
>
> [discount code="[scratch discount_item]"]
> return $Scratch->{discount} * $q;
> [/discount]
>

It looks like that works!  I wonder why I was using a [calc] block?!?!

Thanks, Gert!
Dan



More information about the interchange-users mailing list