therouv / Magento-DebitPayment

DebitPayment Extension for Magento
http://www.magentocommerce.com/magento-connect/debitpayment.html
27 stars 24 forks source link

Create invoice pdf in frontend leads to an error #2

Closed therouv closed 11 years ago

dkrebs commented 11 years ago

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 commented 11 years ago

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 commented 11 years ago

Renamed issue.

dkrebs commented 11 years ago

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 commented 11 years ago

Fixed.

Copying makes more sense because not everyone uses modman.