如何获取或传递电子邮件变量到phtml

时间:2014-11-19 17:51:27

标签: php magento email

好的伙计们,浪费了半天的时间,我现在放弃了。

在我的帐户已被激活的电子邮件中,我想在电子邮件中添加客户唯一ID代码,该代码只不过是客户的初始+我使用php动态创建的客户ID。

现在我有客户ID {{var customer.getId()}}来到电子邮件,我有

{{block type='core/template' area='frontend' template='email/customer_uniq_id.phtml'  customer_id_var='{{var customer.getId()}}' }}

我试图将带有Id的customer_id_var传递给我的customer_uniq_id.phtml

但它没有用,我试过这个:

echo Mage::getModel('core/variable')->loadByCode('customer.ID')->getValue('plain');

和其他代码,但没有。

有关如何在发送电子邮件时获取客户ID的任何线索?

干杯球员

1 个答案:

答案 0 :(得分:0)

尝试$ this-> getData('order'),如下所述:http://www.webspeaks.in/2011/06/customize-new-order-email-template-in-magento.html