


Detailed explanation of how to add new functions and permission settings in the Ecshop backend
How to add new functions and permission settings in the Ecshop backend? This article mainly introduces the addition of new function columns and management permission settings in the Ecshop backend. Friends in need can refer to it. I hope to be helpful.
1. Add menu items
Open the /admin/includes/inc_menu.php
file (backend frame left menu ), add a line at the end as follows:
$modules['17_other_menu']['sns_list'] = 'sns_list.php?act=list';
There are 16 first-level menu items in ecshop by default, so the example here starts from 17. Of course, this key can be chosen at will. The index.php file uses ksort to sort the menu. "17_other_menu" represents the first-level menu, and "sns_list" represents the second-level menu. The value after the equal sign indicates the page link opened by the menu column.
2. Configure the menu language
Open the /languages/zh_cn/admin/common.php file and add the language
$_LANG['17_other_menu'] = '其它设置'; $_LANG['sns_list'] = 'SNS管理';
At this time, log in to the backend as an administrator (admin user) and you will see the newly added menu items. Because the admin permission is "all". If there are multiple administrators in the backend, such as the suppliers of the ecshop mall, or other managers (other accounts created by the admin that can log in to the backend), if you want them to also have the right to view the newly added menu, you must They assign administrative rights to the column.
3. Add the new menu to the permission list
Open the /languages/zh_cn/admin/priv_action.php file and go to "Permission Management" Add the following code below the "First-level Grouping" comment line
$_LANG['other_manager'] = '其它设置';
The "other_manager" here is the permission name of the first-level column. It is consistent with the column name "17_other_menu", or you can choose a name casually. To show the difference here, it is not the same as the menu name.
Then, add the permission name of the secondary column "sns_list". Just add it at the end of this file
//其它管理 $_LANG['sns_list'] = 'SNS管理';
The permission name here is the same as the secondary menu name. Where are these two items now? As shown below
4. Associate the permissions of the first-level menu and the second-level menu
Ecshop: Add a new column in the background. Open the database, see the {pre}_admin_action table, and add two rows of data. As shown in the screenshot below
, the first column of data in the screenshot is action_id, which is the auto-incrementing primary key of the table. The data in column 2 is parent_id, which comes from the superior action_id. The data in column 3 is the permission name (key) defined in step 3. In this case, the two permissions are linked. At this point, open the "Administrator List" in the background, click the "Assign Permissions" icon, and you can see the permissions shown in step 3. Use a background user to check Submit, and the user will be able to see the new menu items after logging in. \
mysql statement:
INSERT INTO .`admin_action` ( `action_id` , `parent_id` , `action_code` , `relevance` ) VALUES ( NULL , '6', 'shipment_view', '' );
Related recommendations:
Deprecated: preg_replace() error in ECSHOP Solution
How to solve the problem that the verification code image does not appear in ecshop
ecshop Detailed explanation of return value of infinite classification recursive function
The above is the detailed content of Detailed explanation of how to add new functions and permission settings in the Ecshop backend. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

When buying a computer, we may not necessarily choose a large hard drive. At this time, if we want to add a new hard drive to win11, we can first install the new hard drive we purchased, and then add partitions to the computer. Tutorial on adding a new hard drive in win11: 1. First, we disassemble the host and find the slot of the hard drive. 2. After finding it, we first connect the "data cable", which usually has a fool-proof design. If it cannot be inserted, just reverse the direction. 3. Then insert the new hard drive into the hard drive slot. 4. After inserting, connect the other end of the data cable to the computer's motherboard. 5. After the installation is completed, you can put it back into the host and turn it on. 6. After booting, we right-click "This Computer" and open "Computer Management" 7. After opening, click "Disk Management" in the lower left corner 8. Then on the right you can

Many users are increasingly favoring the electronic ecosystem of Xiaomi smart home interconnection in modern life. After connecting to the Mijia APP, you can easily control the connected devices with your mobile phone. However, many users still don’t know how to add Mijia to their homes. app, then this tutorial guide will bring you the specific connection methods and steps, hoping to help everyone in need. 1. After downloading Mijia APP, create or log in to Xiaomi account. 2. Adding method: After the new device is powered on, bring the phone close to the device and turn on the Xiaomi TV. Under normal circumstances, a connection prompt will pop up. Select "OK" to enter the device connection process. If no prompt pops up, you can also add the device manually. The method is: after entering the smart home APP, click the 1st button on the lower left

In win11, we can quickly start software or files on the desktop by adding desktop shortcuts, and we only need to right-click the required files to operate. Add a desktop shortcut in win11: 1. Open "This PC" and find the file or software you want to add a desktop shortcut to. 2. After finding it, right-click to select it and click "Show more options" 3. Then select "Send to" - "Desktop Shortcut" 4. After the operation is completed, you can find the shortcut on the desktop.

Tampermonkey Chrome extension is a user script management plug-in that improves user efficiency and browsing experience through scripts. So how does Tampermonkey add new scripts? How to delete the script? Let the editor give you the answer below! How to add a new script to Tampermonkey: 1. Take GreasyFork as an example. Open the GreasyFork web page and enter the script you want to follow. The editor here chooses one-click offline download. 2. Select a script. , after entering the script page, you can see the button to install this script. 3. Click to install this script to come to the installation interface. Just click here to install. 4. We can see the installed one-click in the installation script.

How to add a PolygonMainnet network To use MATIC (Polygon) with Metamask, you need to add a private network called "PolygonMainnet". Transferring in with the wrong network address can cause problems, so be sure to use the "PolygonMainnet" network before transferring out of $MATIC. The Metamask wallet is connected to the Ethereum mainnet by default, but we can simply add "PolygonMainnet" and use $MATIC. Just a few simple copy and paste steps and you're done. First, in the Metamask wallet, click on the network option in the upper right corner and select "C

How to add watermark to images in Vue? Vue is a popular JavaScript framework that is widely used for building web applications. Sometimes we need to add watermarks to images in Vue applications to protect the copyright of the image or increase the recognizability of the image. In this article, I will introduce you to a method of adding watermarks to images in Vue and provide corresponding code examples. The first step is to introduce a third-party library for adding watermarks to Vue. It is recommended to use watermarkj
![Outlook stuck on adding account [Fixed]](https://img.php.cn/upload/article/000/887/227/171116770937641.jpg?x-oss-process=image/resize,m_fill,h_207,w_330)
When you encounter problems adding accounts in Outlook, you can try the following solutions to resolve it. Typically this can be caused by a faulty network connection, corrupted user profiles, or other temporary issues. Through the methods provided in this article, you can easily solve these problems and ensure that your Outlook can run normally. Outlook stuck on adding account If your Outlook is stuck on adding account, then use these fixes mentioned below: Disconnect and reconnect the internet Temporarily disable antivirus software Create a new Outlook profile Try adding account in safe mode Disable IPv6 Run Microsoft Support and Recovery Assistant Repair Office Application Outlook Add Account Required

Common ways to add elements to Java arrays, specific code examples are required In Java, an array is a common data structure that can store multiple elements of the same type. In actual development, we often need to add new elements to the array. This article will introduce common methods of adding elements to arrays in Java and provide specific code examples. A simple way to create a new array using a loop is to create a new array, copy the elements of the old array into the new array, and add the new elements. The code example is as follows: //original array i
