【发布时间】:2013-08-07 10:21:03
【问题描述】:
我尝试在 Magento 管理面板的客户网格中添加客户余额(商店信用)列。它工作正常,但是当我尝试通过输入“发件人:”和“收件人:”值来按客户余额进行搜索时,它会抛出错误“PHP 致命错误:调用非对象中的成员函数 getBackend()... ./app/code/core/Mage/Eav/Model/Entity/Abstract.php 第 816 行"”
我已编辑以下文件: app/code/core/Mage/Adminhtml/Block/Customer/Grid.php
protected function _prepareCollection()
{
$collection = -----------
------------------------
$collection->getSelect()->joinLeft( array('balance_table'=>'enterprise_customerbalance'),
'e.entity_id = balance_table.customer_id', array('balance_table.*'));
$collection->addAttributeToSelect('amount');
$this->setCollection($collection);
return parent::_prepareCollection();
}
---------------------
---------------------
protected function _prepareColumns()
{
----------------------
$this->addColumn('amount', array(
'header' => Mage::helper('customer')->__('Store Credit'),
'index' => 'amount',
'type' => 'currency',
'currency' => 'base_currency_code'
));
----------------------
}
----------------------
任何帮助表示赞赏,
谢谢。
【问题讨论】:
标签: magento