Adding a link to the admin menu programmatically (OpenCart)

I am currently developing a module for a friend and you need to add a link to the dropdown menu. I would prefer that he did not edit the files, but so far the easiest way I've seen is to insert these links (hardcoded into the admin header, that is).

The modules work so well that I cannot believe that there is no easy way to add an administrator to the link itself. I could always add it to the module settings page, but this does not seem to match the purpose of the module settings.

Any help is appreciated.

0
source share
2 answers

The easiest way is to edit all the necessary files, so the controller admin/controller/common/header.php - add the link name and link action, language file admin/language/<THE_LANGUAGE(S)>/common/header.php - add the name records, admin/view/template/common/header.tpl - add a link to the menu link, where applicable.

It's a little harder to do the same with the vQmod extension ...

+6
source

Can't you have a script that adds your <li> to <ul id="menu"> when the page loads?

0
source

Source: https://habr.com/ru/post/1480966/


All Articles