Help with DW Horizontal Repeat Region
Posted: Fri Jul 27, 2007 4:34 am
Dear Gurus
Please help how to solve this code problem in DW. The problem is that I can't see the payment due after repeat all the product items. The do while loop don't cover the rest of the table display. If I put while at the end, the payment due is shown twice and it looks ugly.
Here's the code:
Onion - Edited the thread title to remove pointless '::::::::highlighting!!!!!:::::::::'.
Please help how to solve this code problem in DW. The problem is that I can't see the payment due after repeat all the product items. The do while loop don't cover the rest of the table display. If I put while at the end, the payment due is shown twice and it looks ugly.
Here's the code:
Code: Select all
<tr>
<?php
$rs_order_endRow = 0;
$rs_order_columns = 5; // number of columns
$rs_order_hloopRow1 = 0; // first row flag
do {
if($rs_order_endRow == 0 && $rs_order_hloopRow1++ != 0);
?>
<td align="left"><a rel="nofollow" target="_blank" href="http://www.test.com/price_details.php?code=<?php echo $row_rs_order['code']; ?>"><?php echo $row_rs_order['name']; ?> <?php echo $row_rs_order['colour']; ?> <?php echo $row_rs_order['watt']; ?> <?php echo $row_rs_order['lamptype']; ?> <?php echo $row_rs_order['mounting']; ?></a></td>
<td align="center"><?php echo $row_rs_order['code']; ?></td>
<td align="center"><?php echo $row_rs_order['price']; ?></td>
<td align="right"><?php echo $row_rs_order['qty']; ?></td>
<td align="right"><?php echo $row_rs_order['totunit_price']; ?></td>
</tr>
<?php $rs_order_endRow++;
if($rs_order_endRow >= $rs_order_columns) {
?>
<?php
$rs_order_endRow = 0;
}
} while ($row_rs_order = mysql_fetch_assoc($rs_order));
if($rs_order_endRow != 0) {
while ($rs_order_endRow < $rs_order_columns) {
;
$rs_order_endRow++;
}
echo("</tr>");
}?>
<tr>
<td colspan="5" align="left"><!--DWLayoutEmptyCell--> </td>
</tr>
<tr bgcolor="#ffffff">
<th colspan="4" align="left">Total(Excl VAT & Shipping fees)</th>
<th align="right"><?php echo $row_rs_order['total_price']; ?></th>
</tr>
<tr bgcolor="#ffffff">
<th colspan="4" align="left">Shipping fees(UK delivery only)</th>
<th align="right"><?php echo $row_rs_order['ukship']; ?></th>
</tr>
<tr bgcolor="#ffffff">
<th colspan="4" align="left">VAT 17.5%</th>
<th align="right"><?php echo $row_rs_order['tax']; ?></th>
</tr>
<tr bgcolor="#ffffff">
<th height="21" align="left" valign="top"><span class="style3">Payment Due</span></th>
<th height="21" align="left" valign="top"><!--DWLayoutEmptyCell--> </th>
<th height="21" align="left" valign="top"><!--DWLayoutEmptyCell--> </th>
<th height="21" align="left" valign="top"><span class="style3"><?php echo $row_rs_order['items']; ?></span></th>
<th align="right"><span class="style3"><?php echo $row_rs_order['grand_total']; ?></span></th>
</tr>
<tr>
<th height="21" colspan="5" align="left" valign="top"><span class="style3">* Please recheck client's credit card details. </span></th>
</tr>Onion - Edited the thread title to remove pointless '::::::::highlighting!!!!!:::::::::'.