3

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?

2
  • Hi, i am facing same issue. Did you get any solution?
    – Arjun
    Commented Dec 7, 2018 at 7:08
  • Hi @JN_newble how to migrate only email templates can you suggest me Commented Aug 8, 2019 at 8:47

1 Answer 1

4

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"}}');
1
  • do u have any idea about how to migrate email templates using data migration tool? Commented Aug 8, 2019 at 8:48

Your Answer

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

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