【问题标题】:Email template Magento doesn't work电子邮件模板 Magento 不起作用
【发布时间】:2011-05-23 06:39:12
【问题描述】:

当有人通过 magento 中的联系表格向我发送电子邮件时,电子邮件到达时没有布局,它只显示整个布局代码。

应该是这样的:

嗯嗯 bericht verstuurd via het 联系方式,

  • 姓名:test
  • 电子邮件: jan@jan.nl
  • 电话:nvt

贝里希特:

最好的 meneer/mevrouw Het bericht van de persoon 联系方式 手术重基因组


这样进来的:
<!--@vars
{"var data.name":"Sender Name",
"var data.email":"Sender Email",
"var data.telephone":"Sender Telephone",
"var data.comment":"Comment"}
@-->

<div style="font:11px/1.35em Verdana, Arial, Helvetica, sans-serif;">
<table cellspacing="0" cellpadding="0" border="0" width="98%" style="margin-top:10px; font:11px/1.35em Verdana, Arial, Helvetica, sans-serif; margin-bottom:10px;">
<tr>
<td align="center" valign="top">
<!-- [ header starts here] -->
<table cellspacing="0" cellpadding="0" border="0" width="650">
<tr>
<td valign="top">
<a href="http://www.mijndomeinnaam.nl/"><img src="http://www.mijndomeinnaam.nl/skin/frontend/default/grayscale/images/logo_email.gif" alt="omschrijving logo" style="margin-bottom:10px;" border="0"/></a></td>
</tr>
</table>

<!-- [ middle starts here] -->
<table cellspacing="0" cellpadding="0" border="0" width="650">
<tr>
<td valign="top">
<p><strong>Er is een bericht verstuurd via het contactformulier</strong>,</p>
<ul>
<li>Naam: Jan</li>
<li>E-mail: jan@jan.nl</li>
<li>Telefoon: nvt</li>
</ul>

<p><strong>Bericht:</strong></p>
<p>Beste meneer/mevrouw

Het bericht van de persoon die contact op heeft genomen

</p>
</td>
</tr>
</table>

</td>
</tr>
</table>
</div>

如何解决这个问题?

【问题讨论】:

    标签: email magento


    【解决方案1】:

    在 app/code/core/Mage/Contacts/etc/config.xml 中

    改变

           <email>
                <contacts_email_email_template translate="label" module="contacts">
                    <label>Contact Form</label>
                    <file>contact_form.html</file>
                    <type>text</type>
                </contacts_email_email_template>
            </email> 
    

           <email>
                <contacts_email_email_template translate="label" module="contacts">
                    <label>Contact Form</label>
                    <file>contact_form.html</file>
                    <type>html</type>
                </contacts_email_email_template>
            </email> 
    

    即:html而不是文本

    【讨论】:

    • 不要鼓励编辑核心代码,它会被更新覆盖。
    【解决方案2】:

    在您的 magento 数据库中,转到“core_email_template”表。在“template_type”列中,更改“2”的值。 (将此列应用于所有将此列为“1”的字段或您要设置为 HTML 的所有字段,而不仅仅是文本)

    这样做,您是说此电子邮件模板是 HTML 类型而不是文本。我希望它有效。

    【讨论】:

    • 非常感谢Italo。这就是我需要的答案!
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-05-11
    • 2011-04-10
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多