OPENCART 3:如何从自己的模块中插入任何页面数据?
我有几个字段的模块。我想在联系页面和标题中显示这些数据。如何将此模块连接到范围以接触页面控制器?
我尝试过这样的连接:
$data['mymodule'] = $this->load->controller('extension/module/mymodule');
但是什么都没有。我需要做什么?
PS。我自己的Mudule没有模型。仅共核和语言。
I have own module with several fields. I want to show this data in contact page and in the header. How to connect this module for exemple to contact page controller?
I have tried connect it like this:
$data['mymodule'] = $this->load->controller('extension/module/mymodule');
But nothing. What I need to do?
PS. My own mudule doesn't have model. Cotroller and language only.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我想,这很容易做到。但是我必须确切地弄清楚如何。
首先,我们需要连接控制器中的模块模型。然后连接通过ID所需的模块。最后,根据标准OpenCart方案,我们指定了用于从数组中输出数据的变量。
在模板中
As I thought, it's very easy to do. But I had to figure out exactly how.
First of all, we need to connect the modules model in the controller. Then connect the module that we need by ID. At the end, according to the standard opencart scheme, we specify variables for outputting data from the array.
In the template