How can I customize the payment block in the Magento PDF invoice?

Chris / last updated on March 6, 2024

My Advanced Invoice Layout Extension prints a block with information about the chosen payment method onto the PDF invoice. This block is dynamically filled by the used Magento Payment Extension, e.g. PayPal, DebitPayment, Credit Card, etc. and so this is information is contained in the appropriate Extension files. For example for PayPal the payer email address is printed, for credit cards the credit card number and so on.

So if we want to customize e.g. the text/formatting that is printed on the invoice in case of "Purchase Order" payments we have to do the following steps:

  • copy file app/design/frontend/base/default/template/payment/info/purchaseorder.phtml to your theme folder i.e. app/design/frontend/<yourtheme>/default/template/payment/purchaseorder.phtml
  • customize the file to your needs

Basically it is always recommended to activate the Debug Mode of the AdvancedInvoiceLayout extension for testing different layouts under System › Configuration › Advanced Invoice Layout. With activated Debug Mode the intermediate HTML file will be saved with each print of the PDF invoice, shipment or creditmemo into the directory var/tmp/invoice_debug.html. Therewith you can analyze and customize the HTML structure and CSS style sheets more easily.
However you are advised to disable this setting in production environments for performance reasons.

This process can be done analoguous for other payment methods as well.

Please see also how to customize the Magento PDF layout in general.

« Back to the FAQ overview