Nu heb ik de volgende error die weergeven word als ik de module activeer.
Fatal error: Call to a member function getManufacturers() on a non-object in /home/wnshkimp/domains/hfssport.nl/public_html/catalog/controller/module/brands_slider.php on line 6
Wie kan mij zo snel mogelijk helpen met dit probleem??
De code is:
Code: Select all
<?php
class ControllerModuleBrandsSlider extends Controller {
protected function index() {
$this->language->load('module/manufacturer');
$results = $this->model_catalog_manufacturer->getManufacturers();
// check if resize logos
if ((int)$this->config->get('brands_slider_resize') == 1) {
// resize each image
foreach ($results as $key => &$item) {
$item['image'] = $this->model_tool_image->resize($item['image'],
(int)$this->config->get('brands_slider_image_width'),
(int)$this->config->get('brands_slider_image_height'));
$item['href'] = $this->model_tool_seo_url->rewrite(HTTP_SERVER . 'index.php?route=product/manufacturer&manufacturer_id=' . $item['manufacturer_id']);
}
$this->data['width'] = (int)$this->config->get('brands_slider_image_width');
$this->data['height'] = (int)$this->config->get('brands_slider_image_height');
} else {
// optimization
foreach ($results as $key => &$item) {
$item['image'] = 'image/' . $item['image'];
$item['href'] = $this->model_tool_seo_url->rewrite(HTTP_SERVER . 'index.php?route=product/manufacturer&manufacturer_id=' . $item['manufacturer_id']);
}
$this->data['width'] = null;
$this->data['height'] = null;
}
$this->data['brands'] = $results;
$this->id = 'brands_slider';
if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/module/brands_slider.tpl')) {
$this->template = $this->config->get('config_template') . '/template/module/brands_slider.tpl';
} else {
$this->template = 'default/template/module/brands_slider.tpl';
}
$this->render();
}
}
?>