NopCommerce Development: A Practical Guide

A practical guide to NopCommerce development: architecture, themes and Razor views, writing plugins, payment and email integrations, search, and deploying to IIS or Linux.

Illustration for: NopCommerce Development: A Practical Guide

NopCommerce is an open-source ASP.NET Core e-commerce platform. It's powerful, but specialists are rarer than WordPress or Shopify developers. I've worked on NopCommerce stores like Solware UK; this is the overview I'd give a developer joining one of those projects.

How NopCommerce is organised

  • Nop.Core: domain entities, caching and infrastructure.
  • Nop.Data: data access (Linq2DB) and migrations.
  • Nop.Services: business logic such as catalog, orders, tax and shipping.
  • Nop.Web: the public store (MVC controllers, Razor views, view components).
  • Plugins/: payments, shipping, widgets, misc integrations.

Rule number one: don't edit core files if you can help it. Use a theme and plugins, so upgrades stay possible.

Themes and Razor view overrides

Themes live in Themes/YourTheme. Any view you place there with the same path as in Views/ overrides the default:

Themes/
  YourTheme/
    theme.json
    Content/css/styles.css
    Views/
      Shared/_Root.Head.cshtml
      Product/ProductTemplate.Simple.cshtml

Copy only the views you need to change. Fewer overrides mean easier upgrades.

Writing a plugin

A plugin is a class library that references Nop.Web.Framework and has a plugin.json:

{
  "Group": "Widgets",
  "FriendlyName": "Promo Banner",
  "SystemName": "Widgets.PromoBanner",
  "Version": "1.0",
  "SupportedVersions": [ "4.70" ],
  "FileName": "Nop.Plugin.Widgets.PromoBanner.dll"
}
public class PromoBannerPlugin : BasePlugin, IWidgetPlugin
{
    public bool HideInWidgetList => false;

    public Task<IList<string>> GetWidgetZonesAsync() =>
        Task.FromResult<IList<string>>(new List<string> { PublicWidgetZones.HomepageTop });

    public Type GetWidgetViewComponent(string widgetZone) =>
        typeof(PromoBannerViewComponent);
}

Register services in a NopStartup class and use events (IConsumer<OrderPlacedEvent>) to react to store activity without touching core code.

Payments and email

  • Use official or well-maintained payment plugins (Stripe, PayPal, Worldpay), and test refunds as well as payments.
  • For transactional and marketing email, I've integrated Brevo to sync customers and send order emails reliably. Set up SPF, DKIM and DMARC on the domain first.

Search and performance

The default search is fine for small catalogues. For thousands of products, a Lucene-based or external search plugin improves both relevance and speed. Other quick wins:

  • Enable bundling and minification, and serve images in WebP.
  • Use Redis for distributed caching on multi-instance setups.
  • Check slow SQL queries. Product filtering by attributes is a common hotspot.

Deployment

NopCommerce runs on Windows/IIS or on Linux behind Nginx as a reverse proxy to Kestrel:

dotnet publish src/Presentation/Nop.Web -c Release -o /var/www/nop
# systemd service runs: dotnet Nop.Web.dll --urls http://127.0.0.1:5000

Keep App_Data and wwwroot/images outside your deploy overwrite, and back them up with the database.

When NopCommerce is the right choice

It suits B2B and complex catalogues, multi-store setups and teams already on .NET. For a small shop, WooCommerce or Shopify is usually simpler. If you're already running NopCommerce and need help, I'm happy to talk.

Utsav Karki

Utsav Karki

MSc Computer Science student at Memorial University and Digital Systems & Web Intern at Verisult, based in St. John's, NL. I build with WordPress, Laravel, Next.js and Linux servers. Work with me →