Получаю ошибку как постом выше,
Fatal error: Call to a member function resize() on a non-object in /home/*/public_html/*/catalog/controller/module/categoryproducthome.php on line 29
<?php
class ControllerModulecategoryproducthome extends Controller {
protected $category_id = 0;
protected $path = array();
protected function index() {
$this->language->load('module/categoryproducthome');
$this->data['heading_title'] = $this->language->get('heading_title');
$this->load->model('catalog/category');
$this->load->model('tool/seo_url');
$this->data['categories'] = array();
$results = $this->model_catalog_category->getCategories(0);
foreach ($results as $result) {
if ($result['image']) {
$image = $result['image'];
} else {
$image = 'no_image.jpg';
}
$this->data['categories'][] = array(
'name' => $result['name'],
'href' => $this->model_tool_seo_url->rewrite(HTTP_SERVER . 'index.php?route=product/category&path=' . $result['category_id']),
'thumb' => $this->model_tool_image->resize($image, $this->config->get('config_image_category_width'), $this->config->get('config_image_category_height'))
);
}
$this->id = 'categoryproducthome';
if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/module/categoryproducthome.tpl')) {
$this->template = $this->config->get('config_template') . '/template/module/categoryproducthome.tpl';
} else {
$this->template = 'default/template/module/categoryproducthome.tpl';
}
$this->render();
}
}
?>
Ругается на вот эту строку
// 'thumb' => $this->model_tool_image->resize($image, $this->config->get('config_image_category_width'), $this->config->get('config_image_category_height'))
Я ее закомментировал, страницу открывает, но не показывает картинки, правда у категорий нет картинок, дефолтные дожен же показать?Пожалуйста подскажите куда копать...