X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   result of my php function inside a tpl.. how? (https://forum.x-cart.com/showthread.php?t=32634)

Ginestra 07-18-2007 01:12 AM

result of my php function inside a tpl.. how?
 
for example, I have this part of a tpl

<TR>
<TD width="20%"><B>{$lng.lbl_order_id}:</B></TD>
<TD width="10">&nbsp;</TD>
<TD width="80%"><TT><B>#{$order.orderid}</B></TT></TD>
</TR>

I have my function in php that result something in html ($result = "html code bla bla bla" in which way I can use this variable $result inside this tpl?
Where I must put my function?
For example, I want to use $result and not $order.orderid.

inebriate 07-18-2007 05:58 AM

Re: result of my php function inside a tpl.. how?
 
{php}
$theresultvariable = yourphpcodetogettheresultgoeshere;

smarty->assign("result",theresultvariable);
{/php}


All times are GMT -8. The time now is 04:42 AM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.