Magento 2 – Exception:Required parameter ‘theme_dir’ was not passed

graphic.png
Error message here when trying to print an invoice with SNM PDF Print

We had this error again and again in the past, so I'm going to write a short post about it.
Where does this error come from?
I'm trying to confirm an order, Account, to print a delivery note or a credit note. I have the extension SNM PDF Print installiert, which generates my PDFs.

As soon as I try to print, I get the above error message

Exception:Required parameter ‘theme_dir’ was not passed

In my case I have three different websites. It works fine for two websites. But not with the third website. Here's the special feature, that we M2E-Pro use, to orders from Amazon / Synchronize eBay into the shop. So here seems to be the problem.

The first guess suggests, that it could be because of that, that no template has been defined for this website – unfortunately this is not the solution.

The following way solved it:

  1. /open vendor/m2epro/magento2-extension/Block/Adminhtml/Magento/Payment/Info.php and add the line $this->setData(‘area’, \MagentoFrameworkAppArea::AREA_ADMINHTML); comment out (by prefixing “//”)
  2. /vendor/m2epro/magento2-extension/view/adminhtml/templates/magento/order/payment/info.phtml kopieren
  3. Create the following path /vendor/m2epro/magento2-extension/view/frontend/templates/magento/order/payment and paste the just copied info.phtml

After reloading the cache everything worked fine.

Published by Covos

Since 2009 I have been working intensively with Magento. I started with the creation and operation of B2C stores. This was extended through my work in the logistics sector. This resulted first specialized B2E systems. Today I work day-a day with exciting B2C, B2B- and B2E projects and reports in this blog about challenges and give insider tips.

Leave a Reply

Your email address will not be published. Required fields are marked *