我有 Magento 1.7.0.2,当我尝试在管理面板中编辑客户帐户时出现此错误:致命错误:调用 /home/techspec/public_html/magento/ 中非对象上的成员函数 setRenderer()包括/src/Mage_Adminhtml_Block_Customer_Edit_Tab_Account.php 在第 77 行
$attributes = $customerForm->getAttributes();
foreach ($attributes as $attribute) {
/* @var $attribute Mage_Eav_Model_Entity_Attribute */
$attribute->setFrontendLabel(Mage::helper('customer')->__($attribute->getFrontend()->getLabel()));
$attribute->unsIsVisible();
}
$disableAutoGroupChangeAttributeName = 'disable_auto_group_change';
$this->_setFieldset($attributes, $fieldset, array($disableAutoGroupChangeAttributeName));
$form->getElement('group_id')->setRenderer($this->getLayout()
->createBlock('adminhtml/customer_edit_renderer_attribute_group')
->setDisableAutoGroupChangeAttribute($customerForm->getAttribute($disableAutoGroupChangeAttributeName))
->setDisableAutoGroupChangeAttributeValue($customer->getData($disableAutoGroupChangeAttributeName)));
if ($customer->getId()) {
$form->getElement('website_id')->setDisabled('disabled');
$form->getElement('created_in')->setDisabled('disabled');
} else {
$fieldset->removeField('created_in');
$form->getElement('website_id')->addClass('validate-website-has-store');
即引用文件的第 67 到 87 行。希望有任何帮助。谢谢。