【问题标题】:Magento - How to change font-size for totals in order email?Magento - 如何更改订单电子邮件中总计的字体大小?
【发布时间】:2015-06-28 07:55:27
【问题描述】:

从 1.8 升级到 1.9.1 后,我的订单电子邮件的字体大小已更改为块总数,我不知道如何更改。

目前看起来是这样的:http://www.pic-upload.de/view-26791263/Unbenannt.jpg.html

我想将 font-sie 更改为 12px,就像电子邮件文本的其余部分一样。

这是我的后端模板:

<h1></h1>
<style type="text/css">
<!--
.Stil1 {
font-size: 12px;
font-weight: bold;
}
.Stil2 {font-size: 12px}
.Stil4 {font-size: 10px}
-->
</style>
<body style="background:#FFFFFF; font-family:Verdana, Arial, Helvetica, sans-serif; font-size:12px; margin:0; padding:0;">
<footer style="background:#FFFFFF; font-family:Verdana, Arial, Helvetica, sans-serif; font-size:12px; margin:0; padding:0;">
<div style="background:#FFFFFF; font-family:Verdana, Arial, Helvetica, sans-serif; font-size:12px; margin:0; padding:0;">
<table cellspacing="0" cellpadding="0" border="0" width="100%">
<tr>
    <td align="center" valign="top" style="padding:20px 0 20px 0">
        <table bgcolor="#FFFFFF" cellspacing="0" cellpadding="10" border="0" width="650" style="border:1px solid #E0E0E0;">
            <!-- [ header starts here] -->
            <tr>                   
                <td valign="top" bgcolor="#FFFFFF"><div align="right">
                <p><a href="{{store url=""}}"><img src="{{skin url="images/logo.jpg" _area='frontend'}}" alt="{{var store.getFrontendName()}}"  style="margin-bottom:10px;" border="0"/></a>
</p>
                <p>Shop Name <span class="Stil4">Shop Adress </span></p>
                </div></td>
            </tr>
            <!-- [ middle starts here] -->
            <tr>
                <td valign="top" bgcolor="#FFFFFF">
                    <h1 class="Stil2" style="font-size:12px; font-weight:normal; line-height:22px; margin:0 0 11px 0;"">Sehr geehrte Kundin, sehr geehrter Kunde, </h1>
                    <p class="Stil2">Vielen Dank f&uuml;r Ihre Bestellung. <br>
Die Bearbeitung Ihrer Bestellung sollte innerhalb der n&auml;chsten 5-7 Tage erfolgen. Sollten Sie dann nicht von uns h&ouml;ren, oder keine Ware erhalten, m&ouml;chten wir Sie bitten, sich mit uns in Verbindung zu setzen. </p>
                    <span class="Stil2">Vielen Dank, <br>
                    Ihr Team                    </span>
            <p style="font-size:12px; line-height:16px; margin:0;">&nbsp;</p>              
            </tr>
            <tr>
                <td bgcolor="#FFFFFF">
                    <h2 style="font-size:18px; font-weight:normal; margin:0;"><span class="Stil1">Ihre Bestellung  #{{var order.increment_id}} <small>(get&auml;tigt am  {{var order.getCreatedAtFormated('long')}})</small></span></h2>                </td>
            </tr>
            <tr>
                <td bgcolor="#FFFFFF">
                    <table cellspacing="0" cellpadding="0" border="0" width="650">
                        <thead>
                        <tr>
                            <th align="left" width="325" bgcolor="#FFFFFF" style="font-size:13px; padding:5px 9px 6px 9px; line-height:1em;"><span class="Stil2"> Rechnungsadresse:</span></th>
                            <th width="10"></th>
                            <th align="left" width="325" bgcolor="#FFFFFF" style="font-size:13px; padding:5px 9px 6px 9px; line-height:1em;"><span class="Stil2">Zahlart:</span></th>
                        </tr>
                        </thead>
                        <tbody>
                        <tr>
                            <td valign="top" style="font-size:12px; padding:7px 9px 9px 9px; border-left:1px solid #EAEAEA; border-bottom:1px solid #EAEAEA; border-right:1px solid #EAEAEA; border-top:1px solid #EAEAEA;">
                                {{var order.getBillingAddress().format('html')}}                      <br>    
                                {{htmlescape var=$order.getCustomerEmail()}}                    </td>
                            <td>&nbsp;</td>
                            <td valign="top" style="font-size:12px; padding:7px 9px 9px 9px; border-left:1px solid #EAEAEA; border-bottom:1px solid #EAEAEA; border-right:1px solid #EAEAEA; border-top:1px solid #EAEAEA;">
                                {{var payment_html}}{{var order.customer_taxvat}}                            </td>
                        </tr>
                        </tbody>
                    </table>
                    <br/>
                    {{depend order.getIsNotVirtual()}}
                    <table cellspacing="0" cellpadding="0" border="0" width="650">
                        <thead>
                        <tr>
                            <th align="left" width="325" bgcolor="#FFFFFF" style="font-size:13px; padding:5px 9px 6px 9px; line-height:1em;"><span class="Stil2">Lieferadresse:</span></th>
                            <th width="10"></th>
                            <th align="left" width="325" bgcolor="#FFFFFF" style="font-size:13px; padding:5px 9px 6px 9px; line-height:1em;"><span class="Stil2">Porto:</span></th>
                        </tr>
                        </thead>
                        <tbody>
                        <tr>
                            <td valign="top" style="font-size:12px; padding:7px 9px 9px 9px; border-left:1px solid #EAEAEA; border-bottom:1px solid #EAEAEA; border-right:1px solid #EAEAEA; border-top:1px solid #EAEAEA;">
                                {{var order.getShippingAddress().format('html')}}
&nbsp;                            </td>
                            <td>&nbsp;</td>
                            <td valign="top" style="font-size:12px; padding:7px 9px 9px 9px; border-left:1px solid #EAEAEA; border-bottom:1px solid #EAEAEA; border-right:1px solid #EAEAEA; border-top:1px solid #EAEAEA;">Shipping Fees &nbsp;                            </td>
                        </tr>
                        </tbody>
                    </table>
                    <br/>
                    {{/depend}}
                    {{layout handle="sales_email_order_items" order=$order}}  <br>   
<span class="Stil2">Bestellkommentar:</span>
                    <p style="font-size:12px; margin:0 0 10px 0">{{var order.getEmailCustomerNote()}}</p>             </td>
            </tr>
        </table>
    </td>
</tr>
</table>
</div>
</body>

和模板样式: 身体,TD {颜色:#2f2f2f;字体:11px/1.35em Verdana、Arial、Helvetica、无衬线; }

这在以前运行良好,但现在总计块的大小要大得多。谁能建议我在哪里添加正确的标签来编辑字体大小?

【问题讨论】:

标签: email magento templates font-size


【解决方案1】:

尝试将样式添加到以下模板:

/app/design/frontend/**base/default**/template/sales/order/totals.phtml

或检查相同的文件到您的自定义主题。

【讨论】:

  • 当我在网上搜索解决方案时,有人提到此方法会影响调用 totals.phtml 的其他部分,所以我只想在我的电子邮件中进行更改。你能告诉我如何在这个文件中添加字体大小方法吗?然后我会尝试更改可见的位置。
【解决方案2】:

尝试在 local.xml 上设置字体大小。例如:

<sales_email_order_items>
    <reference name="order_totals">
        <action method="setLabelProperties"><value>style="padding:6px 9px;font-size:12px;"</value></action>
        <action method="setValueProperties"><value>style="padding:6px 9px;font-size:12px;"</value></action>
    </reference>
</sales_email_order_items>

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2011-09-26
    • 2022-01-01
    • 2013-11-21
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-01-01
    相关资源
    最近更新 更多