Magento: Invalid backend model specified: customer/attribute_backend_data_boolean

You will be probably missing the file app/code/core/Mage/Customer/Model/Attribute/Backend/Data/Boolean.php
Add the files and the below content:


<?php
/**
* Magento Enterprise Edition
*
* NOTICE OF LICENSE
*
* This source file is subject to the Magento Enterprise Edition License
* that is bundled with this package in the file LICENSE_EE.txt.
* It is also available through the world-wide-web at this URL:
* http://www.magentocommerce.com/license/enterprise-edition
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@magentocommerce.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade Magento to newer
* versions in the future. If you wish to customize Magento for your
* needs please refer to http://www.magentocommerce.com for more information.
*
* @category Mage
* @package Mage_Customer
* @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
* @license http://www.magentocommerce.com/license/enterprise-edition
*/

/**
* Boolean customer attribute backend model
*
* @category Mage
* @package Mage_Customer
* @author Magento Core Team
*/
class Mage_Customer_Model_Attribute_Backend_Data_Boolean
extends Mage_Eav_Model_Entity_Attribute_Backend_Abstract
{
/**
* Prepare data before attribute save
*
* @param Mage_Customer_Model_Customer $customer
* @return Mage_Customer_Model_Attribute_Backend_Data_Boolean
*/
public function beforeSave($customer)
{
$attributeName = $this->getAttribute()->getName();
$inputValue = $customer->getData($attributeName);
$sanitizedValue = (!empty($inputValue)) ? '1' : '0';
$customer->setData($attributeName, $sanitizedValue);
return $this;
}
}
Magento: Invalid backend model specified: customer/attribute_backend_data_boolean

2 thoughts on “Magento: Invalid backend model specified: customer/attribute_backend_data_boolean

  1. This is clearly the lamest.blogmodel.ever, but lets try adding some rows and iterating through a collection and get the heck out of here before our heads explode. Add the following two actions to your Index Controller.

    Like

Leave a comment