opencart 1.5 how to add module in a header

后端 未结 8 1545
不思量自难忘°
不思量自难忘° 2021-02-14 21:58

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 23:01

    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.

提交回复
热议问题