Plugin Development

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
2 Jahre weitere
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!!
2 Jahre weitere
You'll want your plugin to implement IWidgetPlugin interface, then set which widget zone you would like it displayed in GetWidgetZonesAsync()
https://docs.nopcommerce.com/en/developer/plugins/how-to-write-widget-for-nopCommerce.html

See how it's done in Nivo Slider (note that you likely won't be using async methods in 4.2):
https://github.com/nopSolutions/nopCommerce/tree/develop/src/Plugins/Nop.Plugin.Widgets.NivoSlider
2 Jahre weitere
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!!
2 Jahre weitere
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.
2 Jahre weitere
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.
2 Jahre weitere
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
See http://yourwebsite.com/order/history
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
https://www.nopcommerce.com/en/boards/topic/87617/add-menu-items-to-customer-navigation-including-sub-menus

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
2 Jahre weitere
Thank you Yidna for the link and explanation.

I guess you are right, I have to look up the existing code and learn.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.