【发布时间】:2016-03-30 05:20:34
【问题描述】:
嘿嘿。我的解释不太好,但我会尝试的。 如何从 magento 中的配置中获取数据到电子邮件模板。例如,我已经在商店信息上添加了新字段:
配置 > 常规 > 商店信息
我添加的字段是gst no,代码如下。
system.xml
<fields>
<gst_no>
<label>GST No</label>
<frontend_type>text</frontend_type>
<sort_order>31</sort_order>
<show_in_default>1</show_in_default>
<show_in_website>1</show_in_website>
<show_in_store>1</show_in_store>
</gst_no>
</fields>
它按预期运行。现在我如何在电子邮件模板上调用这个值。比如
{{var store_email}}
换句话说,数据是作为变量工作的。
或者如果有办法将 GST 字段设置为全局变量,如电子邮件、联系电话等。我已经尝试过 {{config path="general/store_information/gst_no"}} 但不起作用。在 php 级别上它会像这样工作Mage::getStoreConfig('general/store_information/gst_no');
提前感谢:)
【问题讨论】:
-
怎么样?抱歉我的解释不好。我的意思是,将自定义数据从配置调用到电子邮件。