I am working on Magento 2 pdf invoice and trying to change layout of default invoice.As I have seen in default Magento pdf there are six column for displaying items in pdf


When I have checked in admin email template it is calling layout for displaying all items

{{layout area="frontend" handle="sales_email_order_invoice_items" invoice=$invoice order=$order}}

and in phtml file


there are only three column

            <th class="item-info">
                <?= /* @escapeNotVerified */  __('Items'); ?>
            <th class="item-qty">
                <?= /* @escapeNotVerified */  __('Qty'); ?>
            <th class="item-subtotal">
                <?= /* @escapeNotVerified */  __('Subtotal'); ?>

I am not getting which file is exactly called when

{{layout area="frontend" handle="sales_email_order_invoice_items" invoice=$invoice order=$order}}

layout is loaded.Please help me if anybody know about it.

  • Hi, did you get the solution? i need the same to customize the default invoice.. share your solutions bro
    – Ask Xah
    Dec 11, 2018 at 11:07

2 Answers 2


Below Model class is responsible for displaying items in invoice pdf.


You need to override this model class.


I realise this is an old post, but thought it may be of help for anyone visiting in future.

{{layout area="frontend" handle="sales_email_order_invoice_items" invoice=$invoice order=$order}}

This handle is reffering to sales_email_order_invoice_items.xml

From this, we can see that it is likely to be inside the module-sales module. vendor/magento/module-sales/view/frontend/layout/sales_email_order_invoice_items.xml

<?xml version="1.0"?>
 * Copyright © Magento, Inc. All rights reserved.
 * See COPYING.txt for license details.
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd" label="Email Invoice Items List" design_abstraction="custom">
    <update handle="sales_email_order_invoice_renderers"/>
    <update handle="sales_email_item_price"/>
        <block class="Magento\Sales\Block\Order\Email\Invoice\Items" name="items" template="Magento_Sales::email/invoice/items.phtml">
            <block class="Magento\Framework\View\Element\RendererList" name="sales.email.order.invoice.renderers" as="renderer.list"/>
            <block class="Magento\Sales\Block\Order\Invoice\Totals" name="invoice_totals" template="Magento_Sales::order/totals.phtml" cacheable="false">
                    <argument name="label_properties" xsi:type="string">colspan="2"</argument>
                <block class="Magento\Tax\Block\Sales\Order\Tax" name="tax" template="Magento_Tax::order/tax.phtml"/>
        <block class="Magento\Framework\View\Element\Template" name="additional.product.info" template="Magento_Theme::template.phtml"/>

Inside this file, you can then see the different PHTML files which are being used:


If you need to edit this files; do not edit the core files directly - Place an over-ride into your theme folder.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.