Я делал так:
в файле ../catalog/controller/product/category.php
Найти:
foreach ($results as $result) {
$product_total = $this->model_catalog_product->getTotalProducts(array('filter_category_id' => $result['category_id']));
$this->data['categories'][] = array(
'name' => $result['name'] . ' (' . $product_total . ')',
'href' => $this->url->link('product/category', 'path=' . $this->request->get['path'] . '_' . $result['category_id'] . $url)
);
}
Заменить на:
foreach ($results as $result) {
$product_total = $this->model_catalog_product->getTotalProducts(array('filter_category_id' => $result['category_id']));
$image = $this->model_tool_image->resize($result['image'], 60, 60);
$this->data['categories'][] = array(
'name' => $result['name'] . ' (' . $product_total . ')',
'href' => $this->url->link('product/category', 'path=' . $this->request->get['path'] . '_' . $result['category_id'] . $url),
'thumb' => $image
);
}
Далее в файле ../catalog/view/theme/YOURTHEME/template/product/category.tpl
Найти:
<?php if ($categories) { ?>
<h2><?php echo $text_refine; ?></h2>
<div class="category-list">
<?php if (count($categories) <= 5) { ?>
<ul>
<?php foreach ($categories as $category) { ?>
<li><a href="<?php echo $category['href']; ?>"><?php echo $category['name']; ?></a></li>
<?php } ?>
</ul>
<?php } else { ?>
<?php for ($i = 0; $i < count($categories); { ?>
<ul>
<?php $j = $i + ceil(count($categories) / 4); ?>
<?php for (; $i < $j; $i++) { ?>
<?php if (isset($categories[$i])) { ?>
<li><a href="<?php echo $categories[$i]['href']; ?>"><?php echo $categories[$i]['name']; ?></a></li>
<?php } ?>
<?php } ?>
</ul>
<?php } ?>
<?php } ?>
</div>
<?php } ?>
Заменить на:
<?php if ($categories) { ?>
<div class="box">
<div class="box-heading"><?php echo $text_refine; ?></div>
<div class="box-content">
<div class="box-product">
<?php foreach ($categories as $category) { ?>
<div>
<?php if ($category['thumb']) { ?>
<div class="image" style="text-align: center">
<a href="<?php echo $category['href']; ?>"><img src="<?php echo $category['thumb']; ?>" alt="<?php echo $category['name']; ?>" /></a>
</div>
<?php } ?>
<div style="text-align: center"><a href="<?php echo $category['href']; ?>"><?php echo $category['name']; ?></a></div></div>
<?php } ?>
</div>
</div>
</div>
<?php } ?>