在菜单 opencart2 中加载 Store 模块的输出

Load the output of Store module in menu opencart2

我有一个 "Store" 模块,我需要将它的输出放在由 /catalog/view/theme/journal2/template/journal2/menu/main.tpl

呈现的菜单中

它的控制器在 catalog/controller/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>

但是 none 这些作品。模块的输出在菜单 main.tpl 中仍然不可见,谁能告诉我如何做对?提前致谢!

我已经通过

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

而不是

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