微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

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

如何解决如何将 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 举报,一经查实,本站将立刻删除。