[ViewComponent(Name = "CheckMoneyOrder")]
public class CheckMoneyOrderViewComponent : NopViewComponent
{
}
public class CheckMoneyOrderPaymentProcessor : BasePlugin, IPaymentMethod
{
public string GetPublicViewComponentName()
{
return "CheckMoneyOrder";
}
}
Do this instead
public class CheckMoneyOrderViewComponent : NopViewComponent
{
}
public class CheckMoneyOrderPaymentProcessor : BasePlugin, IPaymentMethod
{
public Type GetPublicViewComponent()
{
return typeof(CheckMoneyOrderViewComponent);
}
}
This extends to the entire codebase utilizing ViewComponents including Payment plugins, Shipping plugins, External Login plugins, etc. By using a stronger typing approach, the usages of ViewComponents can tracked across the solution.
nopCommerce version: 4.5-rc
Instead of
Do this instead
This extends to the entire codebase utilizing ViewComponents including Payment plugins, Shipping plugins, External Login plugins, etc. By using a stronger typing approach, the usages of ViewComponents can tracked across the solution.
According to https://docs.microsoft.com/en-us/aspnet/core/mvc/views/view-components?view=aspnetcore-6.0,