When run nopcommerce 2.4.0, the link I get is localhost:7725/c/2/computers instead of localhost:7725/categories/2/computers
I don't know where is the code convert categories to c
Please help me to learn MVC via nopcommerce.
\Presentation\Nop.Web\Infrastructure\RouteProvider.cs file
routes.MapLocalizedRoute("Category",
"**c**/{categoryId}/{SeName}",
new { controller = "Catalog", action = "Category", SeName = UrlParameter.Optional },
new { categoryId = @"\d+" },
new[] { "Nop.Web.Controllers" });
and replace it with
routes.MapLocalizedRoute("Category",
"categories/{categoryId}/{SeName}",
new { controller = "Catalog", action = "Category", SeName = UrlParameter.Optional },
new { categoryId = @"\d+" },
new[] { "Nop.Web.Controllers" });
3. Do almost the same in \Libraries\Nop.Services\Seo\SitemapGenerator.cs file (replace {0}c/{1}/{2} with {0}categories/{1}/{2})
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With