Magento-在新订单验证电子邮件中显示自定义客户属性
如何使用Magento版本在新订单验证电子邮件中显示自定义客户属性的值。1.4.1.1 我已将此代码添加到/sales/model/order.php中:Magento-在新订单验证电子邮件中显示自定义客户属性,magento,Magento,如何使用Magento版本在新订单验证电子邮件中显示自定义客户属性的值。1.4.1.1 我已将此代码添加到/sales/model/order.php中: public function getCustomerNumber() { if (!$this->getCustomerId()) return; $customer = Mage::getModel('customer/customer')->load( $this->getCustomerId()); $custom
public function getCustomerNumber() {
if (!$this->getCustomerId()) return;
$customer = Mage::getModel('customer/customer')->load( $this->getCustomerId());
$customer = $customer->getData('customer_number');
return ($customer);
和{var order.getCustomer}}在订单电子邮件模板中,但它得到的是单词“Object”,而不是正确的值
谢谢您的帮助。当函数名为getCustomerNumber时,为什么要{{var order.getCustomer}}?如果我没弄错的话,你应该使用{{var order.getCustomerNumber}}谢谢,当我使用{{var order.getCustomerNumber}时,我什么都没有得到!