不能在第47行的/home/uneguihu/public_html/catalog/controller/event/theme.php中重新声明类ControllerEventTheme

时间:2016-10-27 01:35:24

标签: php opencart

我有些困难,因为有些图片没有显示,我从错误日志中发现了这个错误:

  

不能在第47行的/home/uneguihu/public_html/catalog/controller/event/theme.php中重新声明类ControllerEventTheme

以下是代码:

<?php
class ControllerEventTheme extends Controller {
public function index(&$view, &$data, &$output) {
    if (!$this->config->get($this->config->get('config_theme') .         '_status')) {
        exit('Error: A theme has not been assigned to this store!');
    }

    // This is only here for compatibility with older extensions
    if (substr($view, -3) == 'tpl') {
        $view = substr($view, 0, -3);
    }

    if ($this->config->get('config_theme') == 'theme_default') {
        $theme = $this->config->get('theme_default_directory');
    } else {
        $theme = $this->config->get('config_theme');
    }

    if (is_file(DIR_TEMPLATE . $theme . '/template/' . $view . '.tpl')) {
        $view = $theme . '/template/' . $view;
    } else {
        $view = 'default/template/' . $view;
    }
    /*          
    // If there is a theme override we should get it                
    $this->load->model('design/theme');

    $theme_info = $this->model_design_theme->getTheme($view, $theme);

    if ($theme_info) {
        extract($data);

        ob_start();

        eval('?>' . html_entity_decode($theme_info['code']));

        $output = ob_get_clean();
    } else {
        if (is_file(DIR_TEMPLATE . $theme . '/template/' . $view . '.tpl'))    {
            $view = $theme . '/template/' . $view;
        } else {
            $view = 'default/template/' . $view;
        }       
    }
    */
}
}

0 个答案:

没有答案