My first issue is that when I attempt to open the configuration page of my plugin, nopcommerce throws a 404 page not found.
How is the configuration page url to controller wiring established?
My plugin class contains this code:
/// <summary>
/// PLugin
/// </summary>
public class LicenseManagerPlugin : BasePlugin, IMiscPlugin
{
private readonly IWebHelper _webHelper;
public LicenseManagerPlugin(IWebHelper webHelper)
{
_webHelper = webHelper;
}
/// <summary>
/// Gets a configuration page URL
/// </summary>
public override string GetConfigurationPageUrl()
{
return $"{_webHelper.GetStoreLocation()}Admin/Misc.LicenseManager/Configure";
}
}
When the plugin list is loaded, I see my plugin in the list and GetConfigurationPageUrl() is called
Next I have a controller with the name: MiscLicenseManagerController
[Area(AreaNames.Admin)]
public class MiscLicenseManagerController : BasePluginController
{
...
public IActionResult Configure()
{
return View("~/Plugins/Misc.LicenseManager/Views/Configure.cshtml");
}
}
I do not have a RoutingProvider class as the standard NopCommerce plugins also lack this class.
My plugin is stored in \Presentation\Nop.Web\Plugins\Misc.LicenseManager
The plugin is loaded.
However nopCommerce can not find the controller based on the url.
Is there some magic that I dont yet understand?