Check plugin is enabled

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
6 年 前
Is there is a way to check plugin is Enabled ?

I know only ho to check is installed

   var pluginDescriptor = _pluginFinder.GetPluginDescriptorBySystemName("PromotionFeed.PepperjamPixel");
            if (pluginDescriptor == null)
                throw new Exception("Cannot load the plugin");
            
            if (!pluginDescriptor.Installed)
                throw new Exception("Cannot load the plugin");
6 年 前
Hello

In /Admin/Plugin/List you will find Edit button in all plugins. There is one field called Is Enable. You can use that one.

Or if you want to customization then You can add one field in your plugin configuration page called Enabled. And store it into setting table.

Thanks.
Jatin
6 年 前
The question is how to read this property from code.

forefront wrote:
Hello

In /Admin/Plugin/List you will find Edit button in all plugins. There is one field called Is Enable. You can use that one.

Or if you want to customization then You can add one field in your plugin configuration page called Enabled. And store it into setting table.

Thanks.
Jatin
6 年 前
juliy.cesar wrote:
The question is how to read this property from code.



Hello,

Goto Plugin Controller \Presentation\Nop.Web\Administration\Controllers\PluginController.cs then look EditPopup post action.


This field support only for below type of plugins.
1. Payment plugin
2. Shipping rate computation method
3. Pickup point provider
4. Tax provider
5. External auth method
6. Misc plugins

If your plugin is not in those type of plugin then you have manage enable in field in your configuration page.

Up vote answer solve your query.

Thanks,
Jatin
6 年 前
juliy.cesar wrote:
Is there is a way to check plugin is Enabled ?


Hi juliy,

I would suggest you to refer PreparePluginModel at Nop.Admin > Controllers > PluginController.
Line number: 193

You can check in a same way.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.