Opencart信息页面

Opencart信息页面,opencart,Opencart,好的,我已经找了很长时间了,这让我很困惑。 我正试图添加一个广告,将拉更多的信息在主要内容部分 如果你看,你会在左边橙色广告下面看到两个链接。这些链接之间的唯一区别是信息ID。但是,它们的行为非常不同。写着“关于”的会在主内容区内打开,但写着“推荐”的会打开整个窗口 文档内容中没有任何内容会改变此行为。 除了ID之外,代码中的链接完全相同。 生成的代码显示了相同类型的链接,两个链接都没有目标属性。 我在任何模块中都找不到任何具有查看文档id的逻辑代码的模块 于是,我开始查看数据库。我查看了所有的

好的,我已经找了很长时间了,这让我很困惑。
我正试图添加一个广告,将拉更多的信息在主要内容部分

如果你看,你会在左边橙色广告下面看到两个链接。这些链接之间的唯一区别是信息ID。但是,它们的行为非常不同。写着“关于”的会在主内容区内打开,但写着“推荐”的会打开整个窗口

文档内容中没有任何内容会改变此行为。
除了ID之外,代码中的链接完全相同。
生成的代码显示了相同类型的链接,两个链接都没有目标属性。
我在任何模块中都找不到任何具有查看文档id的逻辑代码的模块

于是,我开始查看数据库。我查看了所有的信息表,但没有发现这两页之间有什么不同

有人能给我指一下正确的方向吗?我觉得一定很简单,但就是找不到

谢谢

注意:信息模块未安装

这是information.php文件

<?php 
class ControllerInformationInformation extends Controller {
    public function index() {  
        $this->language->load('information/information');

        $this->load->model('catalog/information');

        $this->data['breadcrumbs'] = array();

        $this->data['breadcrumbs'][] = array(
            'text'      => $this->language->get('text_home'),
            'href'      => $this->url->link('common/home'),
            'separator' => false
        );

        if (isset($this->request->get['information_id'])) {
            $information_id = (int)$this->request->get['information_id'];
        } else {
            $information_id = 0;
        }

        $information_info = $this->model_catalog_information->getInformation($information_id);

        if ($information_info) {
            $this->document->setTitle($information_info['title']); 

            $this->data['breadcrumbs'][] = array(
                'text'      => $information_info['title'],
                'href'      => $this->url->link('information/information', 'information_id=' .  $information_id),           
                'separator' => $this->language->get('text_separator')
            );      

            $this->data['info_id'] = $information_id;
            $this->data['heading_title'] = $information_info['title'];

            $this->data['button_continue'] = $this->language->get('button_continue');

            $this->data['description'] = html_entity_decode($information_info['description'], ENT_QUOTES, 'UTF-8');

            $this->data['continue'] = $this->url->link('common/home');

            if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/information/information.tpl')) {
                $this->template = $this->config->get('config_template') . '/template/information/information.tpl';
            } else {
                $this->template = 'default/template/information/information.tpl';
            }

            $this->children = array(
                'common/column_left',
                'common/column_right',
                'common/content_top',
                'common/content_bottom',
                'common/footer',
                'common/header'
            );

            $this->response->setOutput($this->render());
        } else {
            $this->data['breadcrumbs'][] = array(
                'text'      => $this->language->get('text_error'),
                'href'      => $this->url->link('information/information', 'information_id=' . $information_id),
                'separator' => $this->language->get('text_separator')
            );

            $this->document->setTitle($this->language->get('text_error'));

            $this->data['heading_title'] = $this->language->get('text_error');

            $this->data['text_error'] = $this->language->get('text_error');

            $this->data['button_continue'] = $this->language->get('button_continue');

            $this->data['continue'] = $this->url->link('common/home');

            if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/error/not_found.tpl')) {
                $this->template = $this->config->get('config_template') . '/template/error/not_found.tpl';
            } else {
                $this->template = 'default/template/error/not_found.tpl';
            }

            $this->children = array(
                'common/column_left',
                'common/column_right',
                'common/content_top',
                'common/content_bottom',
                'common/footer',
                'common/header'
            );

            $this->response->setOutput($this->render());
        }
    }

    public function info() {
        $this->load->model('catalog/information');

        if (isset($this->request->get['information_id'])) {
            $information_id = (int)$this->request->get['information_id'];
        } else {
            $information_id = 0;
        }      

        $information_info = $this->model_catalog_information->getInformation($information_id);

        if ($information_info) {
            $output  = '<html dir="ltr" lang="en">' . "\n";
            $output .= '<head>' . "\n";
            $output .= '  <title>' . $information_info['title'] . '</title>' . "\n";
            $output .= '  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">' . "\n";
            $output .= '  <meta name="robots" content="noindex">' . "\n";
            $output .= '</head>' . "\n";
            $output .= '<body>' . "\n";
            $output .= '  <h1>' . $information_info['title'] . '</h1>' . "\n";
            $output .= html_entity_decode($information_info['description'], ENT_QUOTES, 'UTF-8') . "\n";
            $output .= '  </body>' . "\n";
            $output .= '</html>' . "\n";            

            $this->response->setOutput($output);
        }
    }
}
?>


您是否使用任何自定义模板扩展,允许您为每个项目提供不同的内容?如果你编辑了一个特定的模板,我有几个可能会导致这种情况,这是我唯一能想到的方法。这不是标准的OpenCart,我不确定,但我不这么认为。我继承了这个。原来的首相刚刚把所有的定制工作都寄到了海外。我已经看到了一些糟糕的修改。不过,我很乐意检查您的建议。如果是定制代码,那么海外员工可能会使用的实现非常广泛。如果您不是OC/PHP developerOK,那么您可能需要雇佣一个人来调试它-除此之外没有什么帮助,但是
info()
方法在该类中不是标准的,这就是生成弹出数据的原因。很可能url正在您的
.htaccess
中重写,
index.php
/catalog/controller/common/seo\u url.php
-您需要查找的文本应为
route=information/information/info
,尽管他们的编码方式并不好,而且海外作品往往与过去的经验不同,所以祝您好运!你说的追捕,是指我去海外扼杀这些开发者吗?这不对吗?英雄联盟