I am facing an issues, the condition as below:-
1. I have build a plugin that to enhance on customer details with new attributes such as account number, upline id and etc.
2. I want to override the default controller with the controller found in the plugin instead of making modification on original source such as CustomerController
3. I also want to override the default controller at admin side
The purpose of doing this is because to avoid the difficulty of upgrade. Therefore, I choose to build it as plugin.
But then I try to register the routes in plugin, I found that the routeprovider is executed first then only the default the code as below:
public void RegisterRoutes(RouteCollection routes)
{
var route = routes.MapLocalizedRoute("Register",
"register",
new { controller = "Customer", action = "Register" },
new[] { "Nop.Plugin.Misc.Enhancement.Controllers" }
);
routes.Remove(route);
routes.Insert(0, route);
}
public int Priority
{
get { return -1000000; }
}
but then i found that the route in the plugin was replaced by the default
is there anyway to stop it or is there anyway to hit the conditions as i mention above