For small Businesses, Order is like a heartbeat that makes it alive. Once an order is placed the real war for the store owner is begin to ensure successful order delivery by making the customer happy. CMS like Magento plays a vital role to collect and manage all that’s required customer information in one place. The Magento Sales order view is the most critical area for the store owner to work with where they can see complete order details like name, contact details, shipping and billing address, payment methods they have used etc.
As business varies, several times you think that what if there is such option, therefore, I can save my time to complete things before time and that’s how Magento Custom Development comes into the picture. Till date, we have received so many requests for customizing sales order view section to make stuff easier for the store owner. So, we decided to share one small trick that will help you to add custom Button on the Admin Sales Order View page in Magento 2.
Simply follow this to steps and you are done!
Firstly, we have to create “di.xml” file inside our custom extension folder using below code.
app\code\Vendor\Extension\etc\adminhtml\di.xml

Now the second and last step create New Block file and named it “PluginBtnOrderView.php” at this following path using below code.
app\code\Vendor\Extension\Plugin\PluginBtnOrderView.php

That’s it. Simply clear cache and you will able to find your custom button under the hood of sales order view section in your Magento 2 backend.
Let us know if you are facing an issue while implementing using this code by commenting below.
Happy Coding!

Click to rate this post!
[Total: 16 Average: 4.1]