🧩 Introduction
nopCommerce is one of the most powerful open-source eCommerce platforms built on ASP.NET Core.
Its plugin-based architecture makes it easy to extend or customize the system without touching the core source code, which means safer upgrades and cleaner maintenance.
In this article, we’ll walk through a step-by-step guide to building a custom plugin in nopCommerce — from project setup to installation and deployment.
By the end, you’ll have a working plugin that can integrate new features into your nopCommerce store.
🧰 Prerequisites
Before you begin, make sure you have:
nopCommerce 4.8 source code
Visual Studio 2022 or later
.NET 8 SDK installed
Basic understanding of C#, dependency injection, and ASP.NET Core MVC
🪜 Step 1. Understanding nopCommerce Plugin Structure
All plugins in nopCommerce live inside the /Plugins directory.
Each plugin typically includes:
/Plugins
/YourCompany.PluginName
/Controllers
/Models
/Views
/Data
/Services
/plugin.json
YourCompany.PluginName.csproj
Key fileplugin.json — this tells nopCommerce how to load your plugin.
Example
{
"Group": "Custom",
"FriendlyName": "Hello World Plugin",
"SystemName": "YourCompany.HelloWorld",
"Version": "1.00",
"SupportedVersions": [ "4.80" ],
"Author": "Sangeet Shah",
"DisplayOrder": 1
}
🪄 Step 2. Create a New Plugin Project
Inside the
/Pluginsfolder, create a new folder:YourCompany.HelloWorldAdd a new Class Library project named:
YourCompany.HelloWorld.csprojEdit the
.csprojfile and reference nopCommerce core libraries:
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<AddRazorSupportForMvc>true</AddRazorSupportForMvc>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\..\Presentation\Nop.Web.Framework\Nop.Web.Framework.csproj" />
<ProjectReference Include="..\..\Libraries\Nop.Core\Nop.Core.csproj" />
<ProjectReference Include="..\..\Libraries\Nop.Services\Nop.Services.csproj" />
</ItemGroup>
</Project>
Add
plugin.jsonas shown in Step 1.
🧱 Step 3. Create the Plugin Main Class
Every nopCommerce plugin must inherit from BasePlugin.
Create a file named HelloWorldPlugin.cs:
using Nop.Core;
using Nop.Services.Plugins;
using Nop.Web.Framework.Menu;
namespace YourCompany.HelloWorld
{
public class HelloWorldPlugin : BasePlugin, IAdminMenuPlugin
{
private readonly IWebHelper _webHelper;
public HelloWorldPlugin(IWebHelper webHelper)
{
_webHelper = webHelper;
}
public override string GetConfigurationPageUrl()
{
return $"{_webHelper.GetStoreLocation()}Admin/HelloWorld/Configure";
}
public override void Install()
{
// You can add initialization logic here (like DB setup)
base.Install();
}
public override void Uninstall()
{
// Cleanup logic (like remove settings or data)
base.Uninstall();
}
public void ManageSiteMap(SiteMapNode rootNode)
{
var menuItem = new SiteMapNode
{
Title = "Hello World",
Visible = true,
Url = $"{_webHelper.GetStoreLocation()}Admin/HelloWorld/Configure"
};
rootNode.ChildNodes.Add(menuItem);
}
}
}

Join the conversation! Your thoughts help the community grow.