ThuNderGr wrote:Does this work? i get an error "undefined index thumb".
you need to also define 'thumb' in the controller file
In catalog/controller/product/category.php
FIND
Code: Select all
$results = $this->model_catalog_category->getCategories($category_id);
foreach ($results as $result) {
below it ADD
Code: Select all
//
if ($result['image']) {
$thumb = $this->model_tool_image->resize($result['image'], $this->config->get('config_image_category_width'), $this->config->get('config_image_category_height'));
} else {
$thumb = '';
}
//
then a little further below, FIND
Code: Select all
$this->data['categories'][] = array(
'name' => $result['name'] . ' (' . $product_total . ')',
ADD into that array
Also, the css needs to be fixed. I'm getting the thumbs listed vertically. And I haven't catered for when a category doesn't have an image