I'm setting up a website running on Magento 2.3.4

I've run into an issue with sending emails to buyers. The email template I created through the admin interface is supposed to show the items bought. However it isn't rendering the section with the layout directive.

This is the line I'm talking about:

{{layout handle="sales_email_order_items" order=$order}}

If i send an email using the default template meant for a new order, then the email contains the itemized list

I'm not quite sure why, but the new strict mode introduced in 2.3.4 seems to have broken how the layout directive works.

Does anyone know how to render the itemized list from the order in the email?


Temp solution is:

set in db table: email_template column is_legacy = 1 for this new order email template.

  • This is not working in magento 2.4.1 enterprise edition
    – devhs
    Mar 2 '21 at 10:59
  • working fine, thank you! Dec 29 '21 at 10:29

I had the same problem.

the solution of Domagoj Potkoč is ok but temp.

This module fix the bug - it will automated previous solution: FixAdminEmailTemplate


create plugin to resolve this


<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
    <type name="Magento\Email\Model\Template">
        <plugin disabled="false" name="FixAdminEmailTemplate_Plugin_Magento_Email_Model_Template" sortOrder="10" type="Test\Module\Plugin\EmailTemplate"/>



namespace Test\Module\Plugin;

class EmailTemplate 
    public function beforeBeforeSave(\Magento\Email\Model\Template $subject)
        $subject->setData('is_legacy', 1);
        return [];

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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