Okay I have fixed the issues.
But this will overrite entire Customer controller. What if you want to only override only Register action? is it possible?
public partial class RouteProvider : IRouteProvider
{
public void RegisterRoutes(RouteCollection routes)
{
ViewEngines.Engines.Add(new CustomViewEngine());
var route = routes.MapLocalizedRoute("Register2",
"register",
new { controller = "Customer", action = "Register" },
new[] { "Nop.Plugin.Misc.Enhancement.Controllers" }
);
}
public int Priority
{
get { return 100; }
}
}
But this will overrite entire Customer controller. What if you want to only override only Register action? is it possible?
batmaci, it won't override entire customer controller for that sample, it only override register, other action still go to original. May be you can try using ActionFilterAttribute to override the action as well