Plugin Development

1 month ago
I am new to NopCommerce development. I have a requirement to show some specific orders of a group to a group manager in public site with a link on home page. I checked plugin development but on all places it just have documentation to add a new plugin which I did. Now I have no idea how to call the plugin on the home page of the site on click of User Orders button or link in a new page. I see I can create views in the plugin but how to configure plugin to show data on views and then how to show that view on the user side with link.

I am using Nop version 4.20

If there is a detailed article on this please let me know or please give me some instructions on this.

Thank you very much!!
1 month ago
You'll want your plugin to implement IWidgetPlugin interface, then set which widget zone you would like it displayed in GetWidgetZonesAsync()

See how it's done in Nivo Slider (note that you likely won't be using async methods in 4.2):
1 month ago
Thank you very much for the links :)

I already checked those links and as I described earlier it only shows how to add a plugin/widget not how to add links on site pages and show data there, I mean how to call this in public website. Please let me know if I am missing anything here.

Thank you!!
1 month ago
Well you could make a view component that is a button that posts to a controller in your plugin, then assign that view component button to display in "HeaderLinksAfter" or similar.
1 month ago
Thank you for the reply.

I will check this but if you have some sample or some other link to clearly see what needs to be done that would be helpful. As I searched there is nothing more on this than I already have gone through.
1 month ago
Jitenderdhaliwal wrote:
public site with a link on home page.

A link in the home page topic can be any link using an existing route or newly created route

Order History shows some order data in the Public Website linked to Customer Account
You could have a look at how that works

Maybe you want to add a new menu option to the Customer Account to display your page

Other than that it’s not so simple to find complete instructions to do what you want to do
Mostly it is having a look at the existing code and learning what it does and reusing parts or finding snippets in the forums and piecing things together
Any data displayed in a backend page can also be displayed on a page in the front end by copying and manipulating the views, controllers, actions and routes
1 month ago
Thank you Yidna for the link and explanation.

I guess you are right, I have to look up the existing code and learn.