Nop 4.3, Override RoutUrl

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
3 Jahre weitere
In "Order/Details.cshtml" there is the following RouteUrl for ShipmentDetails:

 <a href="@Url.RouteUrl("ShipmentDetails", new { shipmentId = item.Id })" )">Details</a>

its route code is:
 routeBuilder.MapLocalizedRoute("ShipmentDetails", "orderdetails/shipment/{shipmentId}",new { controller = "Order", action = "ShipmentDetails" });


How can I override this in my plugin RouteProvider
3 Jahre weitere
Greetings,

First of all, you need to solve this with a plugin. If you have written a plugin, you must create a class that implements the IRouteProvider interface.

Next, you have to create the route as you specified and fill it with value such as Priority int.maxvalue, which is added due to IRouteProvider.

  public int Priority => int.MaxValue;

Remember!
It should be added after your route nopCommerce core structure and have the largest number!

Thanks,
Mehmet KURT
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.