I applied the solution from the topic but the issue remains unsolved.
1. Plugin name (Payment plugin): Nop.Plugin.Payments.VanillaPay
2. csproj file:
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<OutputPath>..\..\Presentation\Nop.Web\Plugins\Payments.VanillaPay</OutputPath>
<OutDir>$(OutputPath)</OutDir>
</PropertyGroup>
<ItemGroup>
<None Remove="plugin.json" />
<None Remove="logo.png" />
<None Remove="Views\Configure.cshtml" />
<None Remove="Views\PaymentInfo.cshtml" />
<None Remove="Views\_ViewImports.cshtml" />
</ItemGroup>
<ItemGroup>
<Content Include="plugin.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="logo.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Views\Configure.cshtml">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Views\PaymentInfo.cshtml">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Views\_ViewImports.cshtml">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\Presentation\Nop.Web.Framework\Nop.Web.Framework.csproj" />
<ClearPluginAssemblies Include="$(MSBuildProjectDirectory)\..\..\Build\ClearPluginAssemblies.proj" />
</ItemGroup>
<!-- This target execute after "Build" target -->
<Target Name="NopTarget" AfterTargets="Build">
<!-- Delete unnecessary libraries from plugins path -->
<MSBuild Projects="@(ClearPluginAssemblies)" Properties="PluginPath=$(MSBuildProjectDirectory)\$(OutDir)" Targets="NopClear" />
</Target>
</Project>
3. File located of the Views folder:
_ViewImports.cshtml
Configure.cshtml
PaymentInfo.cshtml
4. Configure Method in my plugin Controller named PaymentVanillaPayController
public async Task<IActionResult> Configure(ConfigurationModel model)
{
...
if (storeScope <= 0)
return View("~/Plugins/Payments.VanillaPay/Views/Configure.cshtml", model);
...
return View("~/Plugins/Payments.VanillaPay/Views/Configure.cshtml", model);
}
5. GetConfigurationPageUrl:
public override string GetConfigurationPageUrl()
{
return $"{_webHelper.GetStoreLocation()}Admin/PaymentVanillaPay/Configure";
}
6. GetPublicViewComponentName:
public string GetPublicViewComponentName()
{
return "PaymentVanillaPay";
}
Any helps would be very appreciated.
Thanks in advance.
Regards.