Magento-如何将自定义变量添加到新订单电子邮件? [英] Magento - how to add custom variables to new order E-mail?

查看:87
本文介绍了Magento-如何将自定义变量添加到新订单电子邮件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要将自定义变量添加到新订单电子邮件中.

I need to add custom variable to new order E-mail.

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

This variables are custom customer attributes.

提前谢谢!

推荐答案

与正在使用的任何其他变量一样,您可以从对象中询问变量,以便在php中进行操作

Like any other variable that you are using you can ask variables from your object so if you do in php

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

您将在模板中完成

{{var customerObject.getMyCustomVariable()}}

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

And as in php side you have to be sure that this attribute exists in your object and is included in collection

这篇关于Magento-如何将自定义变量添加到新订单电子邮件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆