Remove Shipping Method and Payment Method from invoice pdf in Magento

Remove Shipping Method and Payment Method from invoice pdf in Magento

October 2, 2026 · Illustrated author avatarBy Stefan Bogdanescu
Remove Shipping Method and Payment Method from invoice pdf in Magento

Removing Shipping Method and Payment Method from Invoice PDF in Magento

When it comes to customizing invoices generated by your Magento store, you might find that certain sections like the shipping method or payment method are mandatory. However, if you want to completely remove these sections from the invoice PDF, follow this comprehensive guide.

Understanding the Default Magento Invoice Generation Process

Magento uses the app/code/core/mage/Sales/Model/Order/Pdf/Abstract.php file as a base for generating all types of invoices and packing slips. This core file defines the general structure of the documents, which includes sections for shipping method, payment method, etc.

Identifying the Relevant Magento Code

To remove these specific sections from your invoice PDF, you need to override the getSumary function in the app/code/core/mage/Sales/Model/Order/Pdf/Invoice.php file. This function is responsible for generating the summary part of the invoice that contains the shipping and payment methods.

Overriding the getSummary Function

First, extend the core Mage_Sales_Model_Order_Pdf_Invoice class in your custom module:

class MyCompany_Sales_Model_Order_Pdf_Invoice extends Mage_Sales_Model_Order_Pdf_Invoice
{
    // Your code here...
}

Then, override the getSummary function and return an empty string to remove both sections:

public function getSummary()
{
    // We will return an empty string, thus removing both shipping method and payment method from the invoice PDF
    return '';
}

Clearing the Cache

After making this change, you’ll need to clear your Magento cache for the changes to take effect. You can do this by navigating to System > Cache Management in your Magento admin panel.

Verifying the Changes

Once the cache is cleared and the invoice is regenerated, the shipping method and payment method sections should be completely removed from the invoice PDF. The invoice will now look cleaner and more professional, focusing only on the necessary information for your business needs.

// The updated part of the getSummary function
public function getSummary()
{
    // We return an empty string to remove both shipping method and payment method from the invoice PDF
    return '';
}

Conclusion

Removing unwanted sections like the shipping method or payment method from Magento invoices is a straightforward process that involves extending the core Mage_Sales_Model_Order_Pdf_Invoice class and overriding the getSummary function. By following this guide, you can create customized invoices that perfectly match your brand’s aesthetic and information requirements.

Remember to always follow best practices when working with Magento extensions, such as keeping a backup of the original files and testing changes thoroughly before deploying them to your live store.

For more detailed guides on extending Magento core functionality, check out our blog at laravelcompany.com.

Extensions Orders

Our network