//Fatal error: Call to a member function getBackendModel() … during Customer Import

Fatal error: Call to a member function getBackendModel() … during Customer Import

Magento Customer Import sometimes throws an error:
“Fatal error: Call to a member function getBackendModel() on a non-object in app/code/core/Mage/ImportExport/Model/Import/Entity/Customer.php on line 411”

If you encounter the same problem, you need to make sure that your custom customer attributes are assigned to a set. Otherwise the following code will remove your attributes from the array which will trigger the above error during the import:

if (!$attribute->isInSet($setId)) {
    unset($attributes[$code]);
}
By |2017-05-16T22:57:56+00:00January 9th, 2015|Magento|2 Comments

About the Author:

2 Comments

  1. Sonali Ghule May 28, 2018 at 9:49 am - Reply

    how to check whether custom customer attributes are assigned to a set or not.

    • Mageinn June 13, 2018 at 11:29 pm - Reply

      You would need to check this table eav_entity_attribute for more info.

Leave A Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.