You would need to put a counter in and set it to trigger when the count reaches 7
You need to put a new row in after every seven products, the code below should work
It creates a table within the row you were using and allows you to create rows within that new table, note it hasn't been tested and there are the obvious bugs but it should give you a starting point, try it as a drop in fro the code you had, and see if it works
Code:
<tr>
<?php
echo '<td><table><tr>'
$counter = 1;
for ($i=0, $n=sizeof($order->products); $i<$n; $i++) {
echo ' <td align="left" valign="top">' . "\n" .
' <img border="0" src="http://www.pendientesparati.com/images/' . $order->products[$i]['model'] . '.JPG" width="90" height="120"><br>' . $order->products[$i]['qty'] . 'X ' . $order->products[$i]['model'] . '' . "\n";
if (isset($order->products[$i]['attributes']) && (sizeof($order->products[$i]['attributes']) > 0)) {
for ($j = 0, $k = sizeof($order->products[$i]['attributes']); $j < $k; $j++) {
echo '<br><small> <i>' . nl2br(zen_output_string_protected($order->products[$i]['attributes'][$j]['value']));
if ($order->products[$i]['attributes'][$j]['price'] != '0') echo ' (' . $order->products[$i]['attributes'][$j]['prefix'] . $currencies->format($order->products[$i]['attributes'][$j]['price'] * $order->products[$i]['qty'], true, $order->info['currency'], $order->info['currency_value']) . ')';
if ($order->products[$i]['attributes'][$j]['product_attribute_is_free'] == '1' and $order->products[$i]['product_is_free'] == '1') echo TEXT_INFO_ATTRIBUTE_FREE;
echo '</i></small>';
}
}
echo ' </td>' . "\n";
if ($counter==7)
{echo '</tr><tr>';
$counter =1;
}
else
{
$counter = ($counter + 1);
}
}
echo '</tr></table></td>'
?>
</tr>
Bookmarks