Hi want to overwrite the route to AddProductToCart-Details So I can use my custom controller and methods But I can't seem to let it work even with a higher priority set I still get the message a route with the same name already has been registered.
Can someone help me out?
This is the code I've been using:
using System.Web.Mvc;
using System.Web.Routing;
using Nop.Web.Framework.Mvc.Routes;
using Nop.Plugin.Misc.FurnitureConfigurator.Infrastructure;
using Nop.Web.Framework.Localization;
using System.Web;
namespace Nop.Plugin.Misc.FurnitureConfigurator
{
public partial class RouteProvider : IRouteProvider{
public void RegisterRoutes(RouteCollection routes){
routes.MapLocalizedRoute("AddProductToCart-Details",
"addproducttocart/details/{productId}/{shoppingCartTypeId}",
new { controller = "U14SCController", action = "AddProductToCart_Details" },
new { productId = @"\d+", shoppingCartTypeId = @"\d+" },
new[] { " Nop.Plugin.Misc.FurnitureConfigurator.Controllers" });
System.Web.Mvc.ViewEngines.Engines.Add(new ViewEngine());
}
public int Priority
{
get
{
return 2147483647;
}
}
}
}