Magento - 如何将自定义变量添加到新订单电子邮件?

标签 magento

我需要向新订单电子邮件添加自定义变量。

此变量是自定义客户属性。

提前致谢!

最佳答案

像您正在使用的任何其他变量一样,您可以从对象中询问变量,因此如果您在 php 中这样做

<?php echo $customerObject->getMyCustomVariable();?>

你会在模板中做
{{var customerObject.getMyCustomVariable()}}

就像在 php 端一样,您必须确保此属性存在于您的对象中并包含在集合中

关于Magento - 如何将自定义变量添加到新订单电子邮件?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7358971/

相关文章:

magento - 仅显示 magento 我的愿望 list 中启用的产品

mysql - InnoDB : duplicate indixes found - is this very bad?

php - 如何在 Magento 中翻译产品名称和信息

html - Magento,如何在 block 中添加静态 url 链接

php - 你如何在 Magento 中管理你的扩展版本控制

magento - 如何更改 Magento 默认管理语言

linux - 我应该迁移到 windows azure 以节省 magento 的成本吗?

php - Magento - 管理员登录部分

玛根托 : get best selling products based on the current product collection

php - 在 Magento 中显示产品所属的所有类别