Wie bereits in der Überschrift angedeutet, möchte ich gerne die box_best_sellers.html "umstricken".
Sie soll dreispaltig sein und 6 Produkte anzeigen, da ich die Box auf der Startseite im Content
präsentieren möchte.
Wie muss ich vorgehen?
Dies ist mein aktueller Code:
Code:
{config_load file="$language/lang_$language.conf" section="boxes"}
<table class="boxes_outline" width="100%" border="0" cellpadding="2" cellspacing="0">
<tr>
<td class="infoBoxHeading_right"><table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td class="infoBoxHeading_right">{#heading_best_sellers#} </td>
<td> </td>
</tr>
</table></td>
</tr>
<tr>
<td class="infoBox_right" align="left"><table width="95%" border="0" cellpadding="2" cellspacing="0">
<tr>
<td class="boxText"><table border="0" width="100%" cellspacing="0" cellpadding="3" class="infoBoxContents">
<tr>
<td align="left" class="boxText">
<table width="100%" border="0" cellspacing="2" cellpadding="0">
{foreach name=aussen item=box_data from=$box_content}
{php} $col++;
{/php}
<tr>
<td style="border-bottom: 1px solid; border-color: #cccccc;" class="boxText"><table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td class="boxText">
<div align="center">
<a href="{$box_data.PRODUCTS_LINK}"><img src="{$box_data.PRODUCTS_IMAGE}" alt="{$box_data.PRODUCTS_NAME}" /></a><br>
[{$box_data.COUNT}.] <a href="{$box_data.PRODUCTS_LINK}">{$box_data.PRODUCTS_NAME}</a></div>
</td>
</tr>
<tr>
<td class="boxTextPrice" align="right">
</td>
</tr>
<tr>
<td class="boxText" align="right"></td>
</tr>
</table></td>
{php}
if ($col>=3) {
$col=0;
echo '</tr>';
}
{/php}
{/foreach}</tr>
</table></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
</table>
Mit der Funktion
Code:
{foreach name=aussen item=box_data from=$box_content} {php} $col++; {/php}
.......
if ($col>=3) {
$col=0;
echo '</tr>';
}
{/php} {/foreach}
ging es leider nicht.
Gruß,
Sonja