OpenCart admin menu link url

前端 未结 4 1942
迷失自我
迷失自我 2021-01-01 05:02

I\'m verry new to OpenCart and I\'m trying to make a module for it.

I want a link in the admin menu to the module I am creating thus I\'ve edited this file:

4条回答
  •  遥遥无期
    2021-01-01 05:26

    In Opencart 2:

    language file /admin/language//common/menu.php add e.g.:

    $_['text_my_module'] = 'My Module Title';
    

    controller file /admin/controller/common/menu.php add e.g.:

    $data['text_my_module'] = $this->language->get('text_my_module');
    

    and

    $data['my_module'] = $this->url->link('catalog/my_module', 'token=' . $this->session->data['token'], 'SSL');
    

    and finally the template file /admin/view/template/common/menu.tpl add:

  • text_my_module
  • where applicable...

提交回复
热议问题