Is there an existing issue for this?
Current Behavior
Problem
When generating invoice PDFs (e.g. via email attachment or admin print),
the following error occurs:
ErrorException: include(...\template\payment/info/pdf/default.phtml):
Failed to open stream: No such file or directory
Root Cause
Mage_Payment_Block_Info::toPdf() sets the template to payment/info/pdf/default.phtml:
public function toPdf()
{
$this->setTemplate('payment/info/pdf/default.phtml');
return $this->toHtml();
}
In Magento 1.x / OpenMage 19.x the template payment/info/default.phtml
was used directly. The pdf/ subdirectory is new in OpenMage 20.x but
no fallback template is provided in base/default.
Workaround
Create the directory and copy the template:
app/design/frontend/[package]/[theme]/template/payment/info/pdf/default.phtml
(Copy from payment/info/default.phtml)
Expected Behavior
Either:
- A default template
app/design/frontend/base/default/template/payment/info/pdf/default.phtml
is included in OpenMage 20.x, OR
- The migration guide mentions this requirement
Steps To Reproduce
- Have a working Magento 1.9.x or OpenMage 19.x installation with a custom theme
- Migrate to OpenMage 20.x
- Open an order in the backend and create an invoice
- Send the invoice by email or print as PDF
- Error occurs: include(payment/info/pdf/default.phtml): Failed to open stream: No such file or directory
Environment
- OpenMage: 20.18.0
- PHP: 8.2.12
- Migrated from: Magento 1.8 → OpenMage 20.x
Anything else?
No response
Is there an existing issue for this?
Current Behavior
Problem
When generating invoice PDFs (e.g. via email attachment or admin print),
the following error occurs:
Root Cause
Mage_Payment_Block_Info::toPdf()sets the template topayment/info/pdf/default.phtml:In Magento 1.x / OpenMage 19.x the template
payment/info/default.phtmlwas used directly. The
pdf/subdirectory is new in OpenMage 20.x butno fallback template is provided in
base/default.Workaround
Create the directory and copy the template:
app/design/frontend/[package]/[theme]/template/payment/info/pdf/default.phtml
(Copy from
payment/info/default.phtml)Expected Behavior
Either:
app/design/frontend/base/default/template/payment/info/pdf/default.phtmlis included in OpenMage 20.x, OR
Steps To Reproduce
Environment
Anything else?
No response