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


How to get or pass email variables into phtml

好吧,伙计们,在这上面浪费了半天,现在放弃了。

在我的"您的帐户已激活"电子邮件下,我想在电子邮件中添加客户唯一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 的任何线索?

干杯伙计们

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