DEV Community

Cover image for Creating a NopCommerce plugin with .Net Core and Angular - Part I
Diógenes Polanco
Diógenes Polanco

Posted on • Edited on

Creating a NopCommerce plugin with .Net Core and Angular - Part I

Objective:

We will create a plugin for nopcommerce taking advantage of the power of aspnet core and the angular fluids for the frontend. We will create a plugin that will import the products from an external service.


You have to understand how to:

Create a plugin for nopCommerce?

The add-ons are specialized modules which maximize the functionality of nopcommerce such as payment processors, shipping provider, etc. Currently you can take advantage of their official documentation by entering this link.

Develop a webapp with AspNet Core?

The applications with asp net core are very easy to develop these days and when I say easy it is because I remember how it was a bit complex to develop with aspnet in the previous versions. but in another article I will talk about the differences between .Net vs .Net Core. So for the purposes you must also have basic knowledge of aspnet core and can start with this link.

Project Architecture

The product importer plugin is responsible for extracting the products from the ODataProducts service and rules configured in the plugin to upload them to the nopcommerce catalog.

Source code

This plugin only has one component that is responsible for importing the products of the external service so we will only have to develop a class that has the functionality to synchronize the products of the service against the nopcommerce catalog for that we will use C#.

You have to create a console test project in which we will do the service.

Let's execute the following commands:

~/ProductsImport$ dotnet  new console 
~/ProductsImport$ dotnet add package Newtonsoft.Json

We will create the following classes:




The result of the console:

Top comments (1)

Collapse
 
le0maxx profile image
Leomax

Is there a part 2 of this thanks?