We sometimes for ecshop so development, want to add some menus in the background, the most templates previously provided tutorials, but not very systematic, today, the most template to introduce text tutorial to tell you: How to add the module menu in ecshop background! You need to modify four files first: inc_priv.php,inc_menu.php,priv_action.php,commn.php
1. First Open language\zh_cn\admin\commn.php
if the current item is to be added under the Product Management menu
Add the following code as follows:
PHP code
- $_lang[' 77_goods_export '] = ' stock management ';
- $_lang[' 78_goods_export '] = ' shipping management ';
2. Open admin\includes\modules\inc_menu.php
Add the following code:
PHP code
- $modules [' 02_cat_and_goods '] [' 77_goods_export '] = ' jh.php?act=list ';
- $modules [' 02_cat_and_goods '] [' 78_goods_export '] = ' ch.php?act=list ';
after configuring the above two steps to clean up the cache, back to the left of the Product Management menu will be two more menus,
3. Configure the permission system language\zh_cn\admin\priv_action.php
PHP code
- $_lang[' jhgl '] = ' stock management ';
- $_lang[' chgl '] = ' shipping management ';
4. Open admin\includes\inc_priv.php
PHP code
- $purview [' 77_goods_export '] = ' Jhgl ';
- $purview [' 78_goods_export '] = ' Chgl ';
at this point, the rights allocation is complete, but in the rights allocation panel, but did not see the purchase management and shipping management of the two rights.
I was also encountered this problem, looked for a long time, only to find a solution, it is necessary to add some content in esc_admin_action this table can
parent_id is the ID of the menu, the current menu is the product management, and the Product Management menu ID is 1, the background is the permission name.
after adding, clean up the cache, you can see the relevant permission entries in the Rights Assignment panel.
(Editor: most templates)
Ecshop Background Add Module menu detailed tutorial (figure)