It's still not working. I've debugged my plugin, and it never hits RegisterRoutes. Not on install, reloading all plugins, ... So strange. It should at least have one hit. My RouteProvicer.cs file is set to compile.
Can you post the full content of your RouteProvider.cs?
I've made more than a dozen plugins, but never came across this problem.
Controller:
Can you post the full content of your RouteProvider.cs?
I've made more than a dozen plugins, but never came across this problem.
using System.Web.Mvc;
using System.Web.Routing;
using Nop.Web.Framework.Mvc.Routes;
namespace Nop.Plugin.Misc.CustomerService
{
public partial class RouteProvider : IRouteProvider
{
public void RegisterRoutes(RouteCollection routes)
{
routes.MapRoute("Nop.Plugin.Misc.CustomerService.Test",
"Plugins/CustomerService/Test",
new { controller = "Test", action = "Test" },
new[] { "Nop.Plugin.Misc.CustomerService.Controllers" }
);
}
public int Priority
{
get
{
return 0;
}
}
}
}
Controller:
using System.Web.Mvc;
using Nop.Plugin.Misc.CustomerService.Models;
namespace Nop.Plugin.Misc.CustomerService.Controllers
{
public class TestController : Controller
{
public ActionResult Test()
{
var model = new PageListModel();
return View("Nop.Plugin.Misc.CustomerService.Views._CustomerServiceAdmin.List", model);
}
}
}
Looks ok to me, unless I am missing anything. Could it be that your plugin is not installed?
Or if you don't mind, you can PM me your plugin code. I can run the debug on my machine and see what's the problem.
:)