How to check if a plugin has been installed or not

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
Il y a 12 ans
Hi;

I wrote a plugin and used it inside nop.web project. now I want to control that, if plugin has been installed or not. For this purpose I used PluginManager.IsAlreadyLoaded function. Originally this function is protected. I made it public firstly.

I want to learn that how did you do that job in your project? Is the way I used advisable?
Il y a 12 ans
mavera wrote:
Hi;

I wrote a plugin and used it inside nop.web project. now I want to control that, if plugin has been installed or not. For this purpose I used PluginManager.IsAlreadyLoaded function. Originally this function is protected. I made it public firstly.

I want to learn that how did you do that job in your project? Is the way I used advisable?


Hi mavera,

There is already the ability to identify if a plugin is installed. Inject "IPluginFinder" into the classes you need this information.

If you call the method IPluginFinder.GetPluginDiscriptorBySystemName("pluginsystemname") and you get something other than null back then the plugin is installed. Or you can take this a step further and supply a second parameter of "false" and then on the method result (an instance of PluginDescriptor) you can check if the plugin is installed by investigating the boolean property "Installed".
Il y a 12 ans
I turned to your method now. thanks
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.