如何将 html 内容模块输出到 OpenCart 2 模板?

问题描述

通过 OpenCart 管理面板创建了 html 模块。我需要将它显示在页眉最顶部的页面上。 我在 header.PHP 中创建了这样的代码

    $this->load->model('extension/module');
    $custom_html_module = $this->model_extension_module->getModule(88);
    $data['custom_html_module'] = array (
        'title'     => $custom_html_module['module_description'][$this->config->get('config_language_id'
         )]['title'],'description'   => $custom_html_module['module_description'][$this->config->get('config_language_id'
         )]['description']
    
    );

并在header.tpl中输出模块名称

<?PHP echo $custom_html_module; ?>

注意:未定义变量:custom_html_module。

为什么会出现我写错的错误

Opencart 版本为:2.0.3.1 版

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)