I had a custom module Vendor_CustomerAccountExtended for customer modifications. Now I wanted to add there a custom attribute for customer(avatar). The problem is that I can create that attribute only if I delete that module from core_resource. What I have to do to create that attribute without this action? Before I start to modify that module I had only config.xml and AccountController. After that I added new lines of code in AccountController and the next files: etc/config.xml

<?xml version="1.0"?>

            <Vendor_CustomerAccountExtended before="Mage_Customer">Vendor_CustomerAccountExtended</Vendor_CustomerAccountExtended>


class Vendor_CustomerAccountExtended_Helper_Data extends Mage_Core_Helper_Abstract



$this->addAttribute('customer', 'user_avatar', array(
    'type'      => 'varchar',
    'label'     => 'Avatar',
    'input'     => 'file',
    'position'  => 10,
    'required'  => false,//or true
    'is_system' => 0,
$attribute = Mage::getSingleton('eav/config')->getAttribute('customer', 'user_avatar');
$attribute->setData('used_in_forms', array(
$attribute->setData('is_user_defined', 0);
  • How do you come to the conclusion that you need to remove the module? You don't have to. Just clear caches. Config.xml is cached in Magento, and if you use Redis, you have to flush Redis first (if required, via redis-cli -h localhost flushall)
    – MLGS
    Jun 11 at 0:28


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.