I am attempting to divide the columns in a similar manner to the categories. So I borrowed the code that performs this operation for the categories in the header. However, I am clearly missing something as this is not working.
catalog/view/theme/*/template/common/header.tpl
Code: Select all
<?php foreach ($manufacturers as $manufacturer) { ?>
<?php for ($i = 0; $i < count($manufacturer);) { ?>
<ul>
<?php $j = $i + ceil(count($manufacturer) / 3); ?>
<?php for (; $i < $j; $i++) { ?>
<?php if (isset($manufacturer[$i])) { ?>
<li><a href="<?php echo $manufacturer[$i]['href']; ?>"><?php echo $manufacturer[$i]['name']; ?></a></li>
<?php } ?>
<?php } ?>
</ul>
<?php } ?>
<?php } ?>
I'm sure for the talented individuals around here that this would be an easy fix!
Could someone advise what I have done wrong?