firegento / firegento-pdf

Generates nicer and configurable PDF for invoices, creditmemos and shippings in Magento
100 stars 62 forks source link

Different Invoice .pdf for different payment methods #344

Closed DavidDaverl closed 7 years ago

DavidDaverl commented 7 years ago

Is it possible to exclude bankdetails from the Invoice footer (and add a special notice) if a customer selects a special payment method e.g. "Klarna - Kauf auf Rechnung" to avoid the customer is paying to our bank account instead on Klarna's account? Thank you in advance.

sprankhub commented 7 years ago

I actually did that for a customer. I simply removed the bank account details from the imprint in the backend, so that they are not printed on the PDF. Additionally, I used https://github.com/firegento/firegento-pdf-billpay in order to show the correct bank details as a comment.

If you need to remove the bank account details only for a specific payment method, you probably need to write your own engine and rewrite FireGento_Pdf_Model_Engine_Abstract::_insertFooter. There is also an event firegento_pdf_imprint_load_after, but you currently do not have access to the order / payment method in that event.