Creation of Admin Menu Plugin

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
10 лет назад
Hi,

I am trying extend the current admin menu. In order to extend it trying to use the iadminmenu plugin.

I have seen some of the other topics discussed for it but was not able to proceed with those examples. Can someone please share the plug in sample for extension of iadminmenu?

It will help if you can share the .cs, model, view, and controller. Also any other files/changes required.
10 лет назад
https://www.nopcommerce.com/docs/77/how-to-write-a-nopcommerce-plugin.aspx

Note: Implement IAdminMenuPlugin in your plugin class.
10 лет назад
Thanks, Is there a sample admin menu plugin files that you can share?
10 лет назад
How do I?
- Create multiple menu items?
- Create multiple menu tabs? (like customers, promotions...)
- Can I rename the tab from "Plugins" to something else? How?
10 лет назад
any response?
10 лет назад
ppatwari wrote:
Thanks, Is there a sample admin menu plugin files that you can share?


I haven't tried your 3 questions above, but here is here is a sample way to implement the admin menu with one link:

public class FooClass : BasePlugin, IAdminMenuPlugin
    {
        #region configuration
        public FooClass()
        {
        }

        public override void Install()
        {
            base.Install();
        }

        public override void Uninstall()
        {
            base.Uninstall();
        }
        #endregion

        // Implement an admin link
        public void BuildMenuItem(MenuItemBuilder menuItemBuilder)
        {
            menuItemBuilder.Text("Display Name").Url("url path or absolute link").ImageUrl("link to the icon next to menu item");
        }
    }
10 лет назад
Thanks again for the response. I was able to get here but was not abke to do the three things I asked. Any help there? Its extremely exciting to see such nice responses. Waiting for response on 3 queries
9 лет назад
seems this no longer works in nop v3.40

public interface IAdminMenuPlugin : IPlugin
    {
        /// <summary>
        /// Authenticate a user (can he see this plugin menu item?)
        /// </summary>
        /// <returns></returns>
        bool Authenticate();

        /// <summary>
        /// Build menu item
        /// </summary>
        /// <returns>Site map item</returns>
        SiteMapNode BuildMenuItem();
    }


does anyone happen to have some nop v3.40 sample code?

tx
9 лет назад
The implementation described in the documentation and this thread looks to be for version 3.3 and earlier (see here).
Looking for a 3.4 version.
9 лет назад
Disregard my comment above. I forgot to include IAdminMenuPlugin for the class.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.