Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Magento - how to add custom variables to new order E-mail?

Tags:

magento

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

This variables are custom customer attributes.

Thanks in advance!

like image 241
Ahmed Ala Dali Avatar asked Sep 09 '11 08:09

Ahmed Ala Dali


1 Answers

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

like image 74
Anton S Avatar answered Nov 15 '22 10:11

Anton S