Question

I found almost how the print button is created on the invoice page (invoked from vendor/magento/module-backend/view/adminhtml/templates/widget/button.phtml) with the debug option in Magento2. I would like to add in directly on the order page to avoid going to the invoice page each time. I can't find the exact code that need to be added to my custom adminhtml to add it.

I would like to find how to add the function who generate this code :

<button id="print" title="Print" type="button" class="action-default scalable print" onclick="setLocation('MAGENTO_URL/admin/sales/order_invoice/print/invoice_id/ID/')" data-ui-id="sales-invoice-view-print-button">
    <span>Print</span>
</button>

If possible to add like after the view link or as a button on the order information tab since I already have some custom code for this page:

tab invoice

Thanks in advance

Was it helpful?

Solution

I managed to get it working using some code provide from another post: How to Add a Custom Button to Admin Sales Order View in Magento2.

Didn't find for the action link but working for adding a new button.

Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top