在菜单OpenCart2中加载商店模块的输出



我有一个"商店"模块,我需要将其输出放在菜单中,该菜单由/catalog/catalog/view/themey/journal2/journal2/template/journal2/菜单/菜单/main/main.tpl

它的控制器在目录/控制器/journal2/menu.php

我尝试的是:

 <file path="catalog/controller/journal2/menu.php">
    <operation>
    <search><![CDATA[$this->template = $this->config->get('config_template') . '/template/journal2/menu/main.tpl';]]></search>
    <add position="before"><![CDATA[
    $data['ac_all_stores'] = $this->load->controller('module/store');
    ]]></add>
    </operation>
</file>

 <file path="catalog/controller/module/store.php">
    <operation>
    <search><![CDATA[return $this->load->view($this->config->get('config_template') . '/template/module/store.tpl', $data);]]></search>
    <add position="after"><![CDATA[
    $this->load->view($this->config->get('config_template') . 'template/journal2/menu/main.tpl', $data);
    ]]></add>
    </operation>
</file>

但是这些都不是。在菜单的主体中仍然看不到模块的输出。预先感谢!

我设法通过放置

来解决这个问题
    $this->data['ac_all_stores'] = $this->load->controller('module/store');

而不是

   $data['ac_all_stores'] = $this->load->controller('module/store');

最新更新