Override Vendor Page Using Plugin in nopcommerce 4.10

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
5 years ago
I want to override vendor page using plugin

Please help mot able to find how to override
routeBuilder.MapLocalizedRoute("Vendor", "{SeName}",
                new { controller = "Catalog", action = "Vendor" });

Using Plugin in nopcommerce 4.10
5 years ago
Hello sumit7034

ViewLocationExpander.cs

public class ViewLocationExpander : IViewLocationExpander
{
    public IEnumerable<string> ExpandViewLocations(ViewLocationExpanderContext context, IEnumerable<string> viewLocations)
    {
  if (context.AreaName == null && context.ControllerName == "Catalog" && context.ViewName == "Vendor")
        {
            viewLocations = new string[] { "/Plugins/your.plugin.SystemName/Views/Catalog/{0}.cshtml" }.Concat(viewLocations);
        }
     return viewLocations;
     }
}

It can be help for you.
5 years ago
This thing requires changes in Namespace Nop.Web.Framework.Themes, Class ThemeableViewLocationExpander
How this can be done only with the help of plugin
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.