Creating a plugin for shipping

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
3 年 前
Hi,

I have to develop a plugin for a certain shipping operator from my country. I have methods already write for posting an order on his server, for deleting an order, for retrieving AWB and status.
For plugin I need to obtain the related order information from nopCommerce, and to provide storage for some settings (username, pwd, customerid). Also I need to "inject" a button in "Administrative console -> Sales -> Orders" for executing my procedure, and to save (and display) the obtained AWB and status somewhere .
Since I never developed an plugin, and I am not necessarily expert in what concerns nopCommerce architecture, what plugin it may be a good starting point for my implementation?
Regards
3 年 前
fashion4u wrote:
storage for some settings (username, pwd, customerid).

In the firstance instance have a look at Nop.Plugin.Shipping.ShipStation which stores and uses these parameters.

fashion4u wrote:
Also I need to "inject" a button in "Administrative console -> Sales -> Orders" for executing my procedure, and to save (and display) the obtained AWB and status somewhere

Dont know if you are talking about a shipments but this plugin also has code relating to creating shipment, etc
3 年 前
Hi,

Thank you for reply. I will take a look.
What I have at this moment are 3 methods that implements required behavior, but in a standalone Windows Forms test application. So my methods are as intended, now I have to move them into a plugin.
Yes, in second statement, I think that may plugin must interact with nop admin interface, more specifically with order section.
3 年 前
It does not seem to me that you are wanting to create a "Shipping Provider Plugin",  which is a standard type of plugin that is used to get shipping methods and rates for the customer.

RE: "posting an order on his server"
It looks like you want to create a plugin that sends order information to another system.

RE: "obtain the related order information from nopCommerce..."
You would create a plugin that handles the order placed or paid event, and from there, make the API call to your external system.  (or better, queue up the request so that some background/scheduled task would do the API call).

RE: "storage for some settings (username, pwd, customerid)"
It's not clear to me what you need to store.  The external API authorization settings could just be stored in your plugin's "settings".
Customerid??

RE: "to save (and display) the obtained AWB and status somewhere ."
Your plugin can create an Order Note.

RE: ""inject" a button in "Administrative console -> Sales -> Orders" for executing my procedure,"
If you handle the event, then you don't need a button.  If you really need to 'manually' control, you may want to instead handle a different event like when a shipment is created.  If you really need the button, it is possible to create a Widget (in your plugin)
3 年 前
Probably you are right. When I write "shipping" I have in mind the transportation aspect. It is not intended for the frontend, but for the backend.
Simply said, I want to create an interface between orders placed in Nop and courier company, so they can be notified about new orders that they may pickup from store(house), create the AWB for each order, and so on. Somehow a kind of DHL or UPS.
Frankly I have absolutely no idea if it is a good approach to be a plugin in nop, or a separate (web)app. The demand of store owner is minimal manual operation in what concerns this.
3 年 前
RE:  " so they can be notified about new orders that they may pickup"
You can do it in a plugin.  It should probably be based on a Add shipment (i.e. shipment being created).  I don't recall if there is an Event for that, but you can also handle events on EntityInserted<Shipment>.

(P.S.  Adding shipments is not very clear in the docs, but you can do it in a demo)
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.