如何解决Magento电子邮件模板,新发货
我是Magento的新手,我想配置新的货运电子邮件,但是我遇到了问题。
{{template config_path="design/email/header_template"}}
<p>
hi!
</p>
<p>
tracking numbers {{block class='Magento\\Framework\\View\\Element\\Template' area='frontend' template='Magento_Sales::email/shipment/track.phtml' shipment=$shipment order=$order}}.
</p>
<p>
end!
</p>
{{template config_path="design/email/footer_template"}}
和另一种,其中magento建议使用以下变量替换块变量:
{{layout handle="sales_email_order_shipment_items" shipment=$shipment order=$order}}
当我创建新货件时,我收到了电子邮件,但应该是块或布局的部分在电子邮件中为空。
谁知道错在哪里?基本上,我要显示特定货件的所有跟踪号(某些货件具有2个或更多的跟踪号)。
有人有什么主意吗?
谢谢
解决方法
您使用哪个版本的Magento 2?这是一个已知的Magento错误。
要解决此问题,您必须在email_template
数据库表中更改通过后端->市场营销->电子邮件模板覆盖的所有模板的is_legacy = 1
的值。默认情况下,系统将此值设置为0,并且由于这个原因,它不会打印{{layout handle="sales_email_order_shipment_items" shipment=$shipment order=$order}}
。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。