0

Migrated Magento 1 into Magento 2 does not seem to contain any 'default' Magento 2 email templates (using the Magento 2 migration tool). It only contains the Magento 1 email templates that were migrated.

(If this Magento 2 installation had it, I could have used them as reference)

None of the templates variables work in Magento 2 when previewing or emailing.

The following Magento 1 email template (account registration completed):

<!--@subject Welcome, {{var customer.name}}! @-->
<!--@vars
{"store url=\"\"":"Store Url",
"var logo_url":"Email Logo Image Url",
"var logo_alt":"Email Logo Image Alt",
"htmlescape var=$customer.name":"Customer Name",
"store url=\"customer/account/\"":"Customer Account Url"}
@-->

<!--@styles
body,td { color:#2f2f2f; font:11px/1.35em Verdana, Arial, Helvetica, sans-serif; }
@-->
<!-- truncated Html just to get to relevant sections @-->
<table>
                            <a href="{{store url=""}}"><img src="{{var logo_url}}" alt="{{var logo_alt}}" style="margin-bottom:10px;" border="0"/></a>
                        <td valign="top">
                            <h1>Dear {{htmlescape var=$customer.name}},</h1>
                            <h3>Account Registration successfully completed.</h3>

Results in this : Image show variables, instead of the values

Magento 2 articles found does not mention anything about Magento 1 migrated templates.

I checked the following articles, but mostly they just discuss changes between Magento 2 versions:

None of those assist me in changing Magento 1 variables into Magento 2 versions.

Question

Where / how can I find the equivalent versions.

For instance this template has {{var logo_url}}, {{var logo_alt}}, {{htmlescape var=$customer.name}}

A reference, or a way to browse the code to find the what is the customer/order/email address/etc variables versions of Magento 2.

1 Answer 1

0

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
2
  • This answer is a copy of answer magento.stackexchange.com/questions/244926/… which I looked at before asking this question. It does not help in my context, I specifically asked where to get variables so that I can convert Magento1 to Magento2 versions, I also mentioned I do not have any Magento 2 templates, this has nothing to do with Magento 1 variables unfortunately, sorry. May 24, 2021 at 7:32
  • If you don't have any M2 email templates, chances are you've migrated the wrong way. You can refer to this move. I referenced it when migrating my site and everything is working now mageplaza.com/blog/magento-1-to-magento-2-upgrade.html May 25, 2021 at 4:44

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.