【发布时间】:2016-08-24 23:04:39
【问题描述】:
您好,我翻译了 magento 系统,但我不知道在哪里可以找到当我订购小计(不含税)、小计(含税)、运输和处理(不含税)、运输和处理(含税),总计(不含税)。谢谢。
【问题讨论】:
标签: magento
您好,我翻译了 magento 系统,但我不知道在哪里可以找到当我订购小计(不含税)、小计(含税)、运输和处理(不含税)、运输和处理(含税),总计(不含税)。谢谢。
【问题讨论】:
标签: magento
有两种方法可以编辑 Magneto 电子邮件模板。
粗暴的方法是编辑 /app/locale/[language]-[country]/template/email/ 中的文件,我不建议这样做,因为这些文件可能会被 Magento 更新或语言包更新覆盖。
更文明的方法是创建自己的电子邮件模板并分配给相应的操作。
要创建新的电子邮件模板,请转到 Admin\System\Transactional Emails,添加新模板并从下拉列表中选择一个基本模板。因此,例如对于订单确认电子邮件,您需要选择一个合适的基本模板,然后将其加载到编辑器区域。进行必要的更改并保存电子邮件模板。
现在您必须将您的模板分配给相应的操作。例如,对于订单确认电子邮件,您必须转到 Admin\System\Configuration\Sales\Sales Emails。在那里你会找到两个字段New Order Confirmation Template 和New Order Confirmation Template for Guest。
就是这样。我不确定电子邮件模板是否缓存在 Magento 中,因此请刷新您的缓存以确保。
【讨论】:
/app/locale/[language]-[country]/Mage_Sales.csv
Tim 关于 Mage_Sales.csv 的假设部分正确。 让我们看看最新的 Magento 版本(1.7.0.2): app/locale/[Locale_Code]/template/email/sales/order_new.html
{{layout handle="sales_email_order_items" order=$order}}
这会将我们发送到 app/design/frontend/[Your_Package]/[Your_Theme]/layout/sales.xml
<sales_email_order_items>
<block type="sales/order_email_items" name="items" template="email/order/items.phtml">
<action method="addItemRender"><type>default</type><block>sales/order_email_items_order_default</block><template>email/order/items/order/default.phtml</template></action>
<action method="addItemRender"><type>grouped</type><block>sales/order_email_items_order_grouped</block><template>email/order/items/order/default.phtml</template></action>
<block type="sales/order_totals" name="order_totals" template="sales/order/totals.phtml">
<action method="setLabelProperties"><value>colspan="3" align="right" style="padding:3px 9px"</value></action>
<action method="setValueProperties"><value>align="right" style="padding:3px 9px"</value></action>
<block type="tax/sales_order_tax" name="tax" template="tax/order/tax.phtml">
<action method="setIsPlaneMode"><value>1</value></action>
</block>
</block>
</block>
<block type="core/text_list" name="additional.product.info" />
</sales_email_order_items>
这样你就可以找到所有加载的模板
email/order/items.phtml 定义所有订购产品列表的视图
email/order/items/order/default.phtml 标准价格(公司,不含税)和礼品信息
sales/order/totals.phtml、tax/order/tax.phtml 总计、总计、税收等
您可以查看这些模板以查找使用过的帮助程序和 csv 文件:Mage_Sales.csv、Mage_Tax.csv、Mage_Weee.csv。
【讨论】:
Magento 电子邮件模板使用 trans 指令。这意味着。
{{trans "Text in english"}}
你必须翻译成
{{trans "Text in your language"}}
【讨论】: