Shipping Plugin Shipment Creation

9 meses atrás
I am developing a shipping plugin which integrates with courier aggregation third party .
I am able to list availlable shipment providers and place order  . I would like to know where i can plug the code for shipment order creation for third party  integration once order is placed by customer .
New to NopCommerce Development. Please advice .
9 meses atrás
If you have an order created and the products in the order require shipping
Then you can mimic the code created in the View which is displayed when you click the Add Shipment button when the order is displayed in Admin
See https://youwebsite.com/Admin/Order/AddShipment/XXXX where XXXX is the order number

Note: because a shipment is related to an order then the order needs to exist before you can make a shipment.

Once you have a custom View you can create functions to Automatically Create Shipments, Edit shipments and Un-Ship a shipment, Change the Warehouse that a product is shipped from and change the Shipping Method.
These are some of the functions that can be performed using a shipping plugin I have created.
9 meses atrás
sadiq.na wrote:
... once order is placed by customer ...

Have your plugin handle the OrderPlacedEvent. (Although it may be better to handle OrderPaidEvent)

See example in
\Plugins\Nop.Plugin.Misc.Sendinblue\Services\EventConsumer.cs