[ic] Quick and dirty "write to file"

Chris Kershaw chris at endpoint.com
Tue Sep 28 21:04:21 UTC 2010

Peter N wrote:
>> [calc]
>>      Log("add_to_list: $Values->{add_to_list}");
>>      return;
>> [/calc]
>> The tail the error log.
> Yup, add_to_list shows up with a value of 1 in the log:
> c.hsd1.vt.comcast.net Cvrw9MCk:comcast.net -
> [28/September/2010:16:00:48 -0400] f /s/f/process.html add_to_list: 1
> BUT, it only does so when I put that code on checkout.html and refresh
> the page. When I put it into receipt.html, it doesn't work, so it
> would seem that this variable isn't coming along for the ride. So I
> followed Rick's suggestion and put this code
> [if value add_to_list][log file="email_list.txt" type="text"
> interpolate=1][value email][/log][/if]
> [calc]
>     Log("add_to_list: $Values->{add_to_list}");
>     return;
> [/calc]
> into etc/log_transaction. Again, I see the value tracked in the error
> log, but nothing is written to the file.
> Is the syntax of my [if value add_to_list] wrong

Looks fine to me. Have you checked to see if the [if value add_to_list]
condition is being satisfied? Perhaps you can move the log statement
inside the condition. Also try using the logs directory for the file.

Here is some documentation on the log tag itself.



Chris Kershaw
End Point Corp.
Direct Line: 919-249-5356
Fax: 866-281-1373 

More information about the interchange-users mailing list