1

I have done a data migration from magento1(M1) to Magento2(M2), so that the email templates that were stores in M1 are also migrated to M2 DB, Now when I try to preview these migrated templates it throw me some errors like,

Email template '' is not defined.

The solution that comes up in my mind is to copy template files from M1 to M2.

I do not have some expertise in Magento, Can someone please guide if this is even possible to use the M1 templates in M2 or I need to created those templates in M2 from scratch?

or any other idea to get M1 template work in M2 in term of overriding or so?

  • Hi, i am facing same issue. Did you get any solution? – Arjun Dec 7 '18 at 7:08
1

How to fix from ADMIN PANEL

  • in admin: MARKETING > Communications > Email Templates
  • edit template(s)
  • in field Template Content find string {{template config_path="design/email/header"}}
  • replace to string {{template config_path="design/email/header_template"}}
  • also find string {{template config_path="design/email/footer"}}
  • replace to string {{template config_path="design/email/footer_template"}}
  • repeat these actions for MARKETING > Communications > Newsletter Templates

How to fix from DATA BASE

If there are many templates, you can replace strings via SQL commands. Just execute:

UPDATE `email_template` SET `template_text` = REPLACE(`template_text`, '{{template config_path="design/email/header"}}', '{{template config_path="design/email/header_template"}}');
UPDATE `email_template` SET `template_text` = REPLACE(`template_text`, '{{template config_path="design/email/footer"}}', '{{template config_path="design/email/footer_template"}}');
UPDATE `newsletter_template` SET `template_text` = REPLACE(`template_text`, '{{template config_path="design/email/header"}}', '{{template config_path="design/email/header_template"}}');
UPDATE `newsletter_template` SET `template_text` = REPLACE(`template_text`, '{{template config_path="design/email/footer"}}', '{{template config_path="design/email/footer_template"}}');

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.