Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Mage::getResourceModel error
 
kayt
Jr. Member
 
Total Posts:  5
Joined:  2011-11-20
 

I just implemented a module from WebKul Customer as a partner, but I am having a problem with this area of the code. Can anyone please point me to the area that needs fixing?

$collection Mage::getResourceModel(\’customer/customer_collection\’)
->
addAttributeToFilter(\’nickname\’$value)
->
addAttributeToFilter(\’entity_id\’, array(\’nin\’ => $customer_id));

This gives the following error:

Fatal errorCall to a member function getBackend() on a non-object in /home/xxx/public_html/app/code/core/Mage/Eav/Model/Entity/Abstract.php on line 816

I am new to Magento, so any help will be appreciated.

please anyone familiar to this should help out.

 
Magento Community Magento Community
Magento Community
Magento Community
 
tzyganu
Mentor
 
Avatar
Total Posts:  2205
Joined:  2009-11-18
Bucharest, Romania
 

I think this happens because there is no customer attribute called ‘nickname’.
Or if you added the attribute you did not add it correctly.
Try the same code with an other attribute instead of ‘’nickname’ and see what happens. For example ‘firstname’.

Marius.

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top