Magento - how to add custom variables to new order

2020-06-23 07:12发布

问题:

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

This variables are custom customer attributes.

Thanks in advance!

回答1:

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();?>

you would do in template

{{var customerObject.getMyCustomVariable()}}

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



标签: magento