I am working in a nopCommerce 4.0 plugin, in my plugin, I want to override the OnePageCheckout action in Checkout controller.
in the previous version Mvc, this will work with following code
routeBuilder.MapRoute("Plugin.Misc.TrialTracker.OnePageCheckout",
"onepagecheckout/",
new { controller = "Checkout", action = "OnePageCheckout" }, new[] { "Nop.Plugin.Misc.TrialTracker.Controllers" });
however, it doesnt work anymore in ASP.NET core. This is similar problems with the post here. I can't use the solution there as I dont want to touch the default nopCommerce Checkout controller.
To recap, i got 2 Checkout controller, one is under namespace Nop.Web.Controller, another one is under namespace Nop.Plugin.Misc.TrialTracker.Controllers. and there is one default RouteProvider registered the route \onepagecheckout whith Nop.Web.Controller.CheckoutController controller's OnePageCheckout action. Without touching the default RouteProvider and Nop.Web.Controller.CheckoutController, how can I make the route \onepagecheckout use my own controller action?
Thanks