How to Auto-generate Invoices and Shipments for Backend Orders in Magento 2
No Coding Required!
Enable auto invoice & shipment in Magento 2 in just a few clicks.
✅ Meets Magento coding standards.
Magento is a fantastic platform to use as a POS for a physical store. You can manage customer accounts and place orders on their behalf. You’ll must manually generate invoices and shipments in Magento 2 for every order.
But what if you could auto-generate invoices and shipments for backend orders in Magento 2? It would save a lot of time processing the backend orders in the physical store.
This micro post is aimed at helping you auto-generate invoices and shipments for backend orders in Magento 2. 👇🏼
Why Auto-generate Invoices and Shipments for Backend Orders in Magento 2?
If you’re using Magento to process in-store orders, the invoice and shipments need to be generated instantly.
Automating these tasks in Magento 2 can save a lot of time for you and make the process smoother.
Also Read, Create Magento 2 Auto Invoices and Shipments
Methods to Auto Generate Invoice and Shipment for Backend Orders in Magento 2
Mainly, there are two ways to auto-generate invoices and shipments for Magento 2 backend orders. You can do it programmatically or using an extension, as there is no default functionality in Magento 2.
1. Programmatic Method
This method suits you if you’re a developer or technical geek. We’ll use the event and observer method to automatically generate invoices and shipments for Magento 2 backend orders.
For example, create the app\code\Meetanshi\AutoInvShip\etc\adminhtml.xml file with the following code:
1 2 3 4 5 6 |
<?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Event/etc/events.xsd"> <event name="sales_order_save_commit_after"> <observer name="vendor_module_sales_order_commit_after" instance="vendor\module\Observer\OrderplaceAfter"/> </event> </config> |
In the above code, the observer OrderplaceAfter is called after the event of order placement is triggered. You’ll need to put a custom code for invoice & shipment generation in OrderplaceAfter.php file in the vendor/module/Observer directory.
Earlier, we showed you programmatic methods to generate invoices and shipments in Magento 2.
2. Using an Extension
Meetanshi’s Magento 2 Auto Invoice & Shipment is the easiest method to auto-generate invoices & shipments for backend orders. The extension helps you auto generate invoices and shipments in Magento 2 through easy installation and set up.
Just install the extension and enable the functionality from the configuration. You can also enable the extension for specific payment methods per your requirements.
In addition to this, you can also choose to switch auto-generation functionality for invoices and shipments individually. Also as we know with increasing E-commerce facilities, the default features fall short. Fortunately, Magento 2 also allows customizing the default features, for example, generate Magento 2 invoice with pending status.
Try the Demo of Magento 2 Auto Invoice & Shipment extension now.
I hope the above micro post will be helpful to you. 🙂
You can use the event + observer method to auto-generate invoices and shipments for backend orders in Magento 2. Or the easy way to do that is using Meetanshi’s Magento 2 extension.
Automate invoice & shipment generation in Magento 2 with our simple extension. Check out the free demo now!
Jignesh Parmar
An expert in his field, Jignesh is the team leader at Meetanshi and a certified Magento developer. His passion for Magento has inspired others in the team too. Apart from work, he is a cricket lover.
Prev
Monthly Recap: Meetanshi Updates – July 2023
How Much Does Ecommerce Mobile App Development Cost in 2024
Next