在 Nop Commerce 的类别着陆页中的 url“{cate-name}/{se-name}”中包含类别名称时出现问题
Issue while including category name in url "{cate-name}/{se-name}" in category landing page in Nop Commerce
我正在使用 nopcommerce 3.40,我想在类别登陆页面的 url 中包含父类别名称,我可以通过
在创建类别时从管理员端在 sename 中手动添加父类别名称,例如我有父类别 saree 然后在 sename 中我给出 "saree/test"
并添加以下代码
Nop.web\Infrastructure\GenericUrlRouteProvider.cs
routes.MapGenericPathRoute("AllUrls1",
"{*generic_se_name}",
new { controller = "Common", action = "GenericUrl" },
new[] { "Nop.Web.Controllers" });
这样我就可以在结帐页面(我正在使用单页结帐)中解决我的 result.But 问题。问题是在选择帐单地址之后,而不是转到送货地址部分,它重定向到购物车页。
有什么我需要做的额外的事情,我缺少这个问题或任何其他方式来获得url我想要的类别登陆页面?
您不能这样操作,最好的方法是修改 nopCommerce 路由处理程序中的代码。转到下面的文件并修改它。
/Presentation/Nop.Web.Framework/Seo/GenericPathRoute.cs
我正在使用 nopcommerce 3.40,我想在类别登陆页面的 url 中包含父类别名称,我可以通过 在创建类别时从管理员端在 sename 中手动添加父类别名称,例如我有父类别 saree 然后在 sename 中我给出 "saree/test" 并添加以下代码 Nop.web\Infrastructure\GenericUrlRouteProvider.cs
routes.MapGenericPathRoute("AllUrls1",
"{*generic_se_name}",
new { controller = "Common", action = "GenericUrl" },
new[] { "Nop.Web.Controllers" });
这样我就可以在结帐页面(我正在使用单页结帐)中解决我的 result.But 问题。问题是在选择帐单地址之后,而不是转到送货地址部分,它重定向到购物车页。
有什么我需要做的额外的事情,我缺少这个问题或任何其他方式来获得url我想要的类别登陆页面?
您不能这样操作,最好的方法是修改 nopCommerce 路由处理程序中的代码。转到下面的文件并修改它。
/Presentation/Nop.Web.Framework/Seo/GenericPathRoute.cs