EDIT: /catalog/view/theme/default/template/common/header.tpl
FIND:
Code: Select all
<div>
<?php for ($i = 0; $i < count($category['children']);) { ?>
<ul>
<?php $j = $i + ceil(count($category['children']) / $category['column']); ?>
<?php for (; $i < $j; $i++) { ?>
<?php if (isset($category['children'][$i])) { ?>
<li><a href="<?php echo $category['children'][$i]['href']; ?>"><?php echo $category['children'][$i]['name']; ?></a></li>
<?php } ?>
<?php } ?>
</ul>
<?php } ?>
</div>
Code: Select all
<div>
<?php for ($i = 0; $i < count($category['children']);) { ?>
<?php if (count($category['children']) <= 10) { ?>
<ul>
<?php $j = $i + ceil(count($category['children']) / $category['column']); ?>
<?php for (; $i < $j; $i++) { ?>
<?php if (isset($category['children'][$i])) { ?>
<li><a href="<?php echo $category['children'][$i]['href']; ?>"><?php echo $category['children'][$i]['name']; ?></a></li>
<?php } ?>
<?php } ?>
</ul>
<?php } else { ?>
<ul>
<?php $j = $i + ceil(count($category['children']) / 4); ?>
<?php for (; $i < $j; $i++) { ?>
<?php if (isset($category['children'][$i])) { ?>
<li><a href="<?php echo $category['children'][$i]['href']; ?>"><?php echo $category['children'][$i]['name']; ?></a></li>
<?php } ?>
<?php } ?>
</ul>
<?php } ?>
<?php } ?>
</div>

The code above will display any category with more than 10 sub-categories in 4 columns. The number of sub-categories required before it displays in columns can be modified by replacing the number 10 in:
Code: Select all
<?php if (count($category['children']) <= 10) { ?>
Code: Select all
<?php $j = $i + ceil(count($category['children']) / 4); ?>