Hi Guys
I have been messing around with nop this evening. I was trying to remove the product ID & p/ from the product URL.
I was planning to try and direct the routes to a custom controller to handle the product lookup. I do appreciate it's not going to be as efficient as looking up ID but am interesting in doing it.
I tried the below and set it as a low priority route (so the static routes still fire correctly).
It creates the desired URL's but it triggers the 404 page when clicked.
If I comment out the new { productId = @"\d+" }, it appends the productId as a querystring but navigates correctly to the product page and I can retrieve the SeName parameter for lookup.
routes.MapLocalizedRoute("Product",
"{SeName}",
new { controller = "CustomController", action = "Product" },
new { productId = @"\d+" },
new[] { "Nop.Web.Controllers" });
Anyone got any ideas, or I am approaching this the wrong way?
I am using nop 2.3