php - How to print an EAV-value in email template -


i've introduced custom eav attribute customer object. let's call myvalue. within several places in magento, i'm printing value this:

echo mage::getsingleton('customer/session')->getcustomer()->getmyvalue(); 

now, i'd print order confirmation email template. how can that?

i've found solution.

first, created new directory mydirectory in app/design/frontend/base/default/template/. in directory, put file myvalue.phtml following content.

 <?php   $customer=$this->getdata('order')->getcustomer();   print_r($customer->getmyvalue());  ?> 

and i've included block in email template using line:

 {{block type='core/template' area='frontend' template='mydirecory/myvalue.phtml' order=$order}} 

Comments

Popular posts from this blog

Magento/PHP - Get phones on all members in a customer group -

php - Bypass Geo Redirect for specific directories -

php - .htaccess mod_rewrite for dynamic url which has domain names -