
terrykhatri531
User
Jul 18, 2014, 1:37 PM
Post #1 of 3
(2157 views)
|
Calculating variables in HTML::Template
|
Can't Post
|
|
Hi Chris, Is it possible to calculate or to be exact in my case, sum up a variable value in TMPL_LOOP and display it the way I have shown in the attached picture. Here is the TMPL_LOOP code
<!-- TMPL_LOOP NAME=ROWS --> <tr> <td><!-- TMPL_VAR NAME=OrderID --></td> <td><!-- TMPL_VAR NAME=ProductID --></td> <td><!-- TMPL_VAR NAME=ProductName --></td> <td align="right"><!-- TMPL_VAR NAME=UnitPrice --></td> <td align="right"><!-- TMPL_VAR NAME=Quantity --></td> <td align="right"><!-- TMPL_VAR NAME=Discount --></td> <td align="right"><!-- TMPL_VAR NAME=Total --></td> <td> <ul class="tsc_pagination tsc_paginationA tsc_paginationA09"> <li><a href="orddetails.pl?go=Details&prodid=<!-- TMPL_VAR NAME=ProductID -->&orderid=<!-- TMPL_VAR NAME=OrderID -->">Edit</a></li> </ul> </td> <td> <ul class="tsc_pagination tsc_paginationA tsc_paginationA09"> <li><a href="delorddet.pl?go=Details&prodid=<!-- TMPL_VAR NAME=ProductID -->&orderid=<!-- TMPL_VAR NAME=OrderID -->">Delete</a></li> </ul> </td> </tr> <!-- /TMPL_LOOP --> I want to sum up the Total variable shown in blue coloring above and display it at the bottom the way I have shown in the picture. If not any ideas how I can achieve it. Many thanks ! Terry
|