Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create invoice pdf in frontend leads to an error #2

Closed
therouv opened this issue Nov 14, 2012 · 5 comments
Closed

Create invoice pdf in frontend leads to an error #2

therouv opened this issue Nov 14, 2012 · 5 comments

Comments

@therouv
Copy link
Owner

therouv commented Nov 14, 2012

No description provided.

@dkrebs
Copy link

dkrebs commented Aug 20, 2013

Here some more information regarding this error:

Calling Itabs_Debit_Block_Info->toPdf() leads to

Warning: include(): Filename cannot be empty in /var/www/u0500072_001/public/magento/web/app/code/core/Mage/Core/Block/Template.php on line 246

The system is looking for the following template file:

app/design/frontend/base/default/template/debit/debit.phtml

The filename is defined in

 61     public function toPdf()
 62     {
 63         /* @var $helper Itabs_Debit_Helper_Data */
 64         $helper = Mage::helper('debit');
 65         if ($helper->getDebitType() == Itabs_Debit_Helper_Data::DEBIT_TYPE_SEPA) {
 66             $this->setTemplate('debit/sepa/debit.phtml');
 67         } else {
 68             $this->setTemplate('debit/debit.phtml');
 69         }
 70
 71         return $this->toHtml();
 72     }

But the template (same for sepa) is not part of the extension.

Solution: Change

debit/debit.phtml

to

debit/info.phtml

@therouv
Copy link
Owner Author

therouv commented Aug 20, 2013

Hi,

it seems that you tried to print an invoice pdf in the frontend area. Which extension are you using?

This extension currently only supports printing an invoice pdf in the adminhtml area. The necessary template files are located in app/design/adminhtml/default/default/template/debit/. But I will add them to the frontend area as well.

Kind Regards

@therouv
Copy link
Owner Author

therouv commented Aug 20, 2013

Renamed issue.

@dkrebs
Copy link

dkrebs commented Aug 20, 2013

Ah, all right, thanks for the quick reply - the import script we are using for importing orders into the customers ERP system was throwing an error.
You could just link the file in the modman file to the frontend area without copying it.

@therouv
Copy link
Owner Author

therouv commented Aug 20, 2013

Fixed.

Copying makes more sense because not everyone uses modman.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants