opencart 1.5 how to add module in a header

后端 未结 8 1802
小鲜肉
小鲜肉 2021-02-14 22:28

Please some one tell me how can I position modules like slider or banner in header or how can we define additional regions for the modules.

8条回答
  •  盖世英雄少女心
    2021-02-14 22:42

    I read all of your answer. Forget all things. It's very easy to call any module into header section.

    Open your catalog/controller/common/header.php file

    $this->data['YOUR_MODULE_NAME'] = $this->getChild('module/YOUR_MODULE_NAME');

    Now Open .tpl file of header, which is located at catalog/view/theme/YOUR_THEME/template/common/header.tpl

    and echo your desire module whenever you want, like as:

    That's it. you are done.

提交回复
热议问题