[ic] data structures behind tags?

Dennis Chen interchange-users@icdevgroup.org
Tue May 20 17:28:00 2003


> 
> We have a kind of hybrid Interchange system here (it is 4.8.3 
> I'm pretty
> sure).  What I am trying to do is parse the report files created from
> tags in the template file /<our interchange 
> installation>/etc/report.  I
> have a little daemon that picks up on when a new order comes 
> through and
> starts the parsing process for the new order.  I'm finding the parsing
> very frustrating though, and what I would REALLY like to do 
> is just tap
> into the data structures behind the tags and grab that data 
> directly to
> paste it into my own format (take it as a given that my daemon will be
> running on the same machine as the interchange server).  Can anybody
> suggest how to do this, would it even be possible?  Otherwise 
> I'll have
> to keep monkeying with the report template...

Depends on what you want to do, but if you just want to extract the data 
from the database, then you can just write some sql query tags
i.e. paste this into a new page in your catalog

<table>
[query sql="select * from transactions"
	type=list]
<tr>
  <td>[sql-param order-number]</td>
  <td>[sql-param fname]</td>
  <td>[sql-param lname]</td>
  <td>[sql-param nitems]</td>
  <td>[sql-param subtotal]</td>
  <td>[sql-param salestax]</td>
  <td>[sql-param total_cost]</td>
</tr>  
[/query]
</table>

Look through the admin to find the other fields in the transactions table
that you 
want to print out.  Orderline table as the details of the item ordered.

Hope that helps.  Good luck :)
Dennis