I am trying to get a magento 2 shop up. I managed to install everything, but I am missing the link to get the invoice as a pdf on the frontend (which is mandatory for my clients). Here’s what I have:
As you can see, i have all the links to print the order, the invoice and All invoices, but they all take me to a html page, that prints like it, which is pretty annoying. I can’t manage to find any solution to this problem. Is this a base feature in magento or do i really need to pay and install another module in order to achieve this? Thanks in advance.
2
Answers
We managed to finally get the answer to this problem by just adding a module to our magento 2 installation. I provide the link of it. https://www.mageplaza.com/magento-2-pdf-invoice-extension/ It is working well for the past month now.
Now you are ready to use this controller. Just create a link and put there href with a path to our controller (In some cases it is a good idea to use MagentoSalesBlockOrderInfo as a class to your block for getting order like
$order = $block->getOrder();
)Having an order information you can get invoices in your .phtml file