Remove existing route and inject new route in nopCommerce 4.00 via plugin

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
5 anni tempo fa
Hello,

I want to remove existing route from RouteCollection and want to add new route with same route name - HomePage via plugin.

Existing route name:

//home page
            routeBuilder.MapLocalizedRoute("HomePage", "",
        new { controller = "Home", action = "Index" });



Want to replace it with


            routeBuilder.MapLocalizedRoute("HomePage", "",
        new { controller = "CustomPage", action = "Homepage" });



I tried several ways but not get any luck.
5 anni tempo fa
I believe you should be able to achieve this by having the Order property of your RouteProvider return -100000 or something like that.
5 anni tempo fa
It will give error with Route already exist with name 'HomePage'.
5 anni tempo fa
Anyone have idea on this?

I posted same post on stackoverflow
5 anni tempo fa
I've answered it on StackOverflow.
5 anni tempo fa
Thank you. I’ll check and update answer and post solution here if it worked.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.