hi have to add a custom attribute to the Customer. so i've extended the core Customer module, these are files involved and directory tree:
//app/code/local/Nauba/etc/config.xml
<?xml version="1.0"?>
<config>
<modules>
<Nauba_Customer>
<version>0.0.1</version>
</Nauba_Customer>
</modules>
<global>
<models>
<customer>
<rewrite>
<customer>Nauba_Customer_Model_Customer</customer>
</rewrite>
</customer>
</models>
</global>
</config>
// app/code/local/Nauba/Customer/Model/Customer.php
class Nauba_Customer_Model_Customer extends Mage_Customer_Model_Customer
{
function _construct()
{
parent::__construct();
}
}
// app/etc/modules/Nauba_Customer.xml
<?xml version="1.0"?>
<config>
<modules>
<Nauba_Customer>
<active>true</active>
<codePool>local</codePool>
</Nauba_Customer>
</modules>
</config>
//app/code/local/Nauba/Customer/sql/nauba_customer_setup/mysql4-upgrade-1.6.2.0.2-1.6.2.0.3.php
$installer = $this;
$installer->startSetup();
/**
* Adding custom attributes to customer
*/
$installer->addAttribute('customer', 'elite_invitation', array(
'label' => 'ID prodotto invito Elite',
'type' => 'varchar',
'visible' => true,
'visible_on_front' => false,
'required' => false,
'backend' => '',
'frontend' => '',
'input' => 'text',
'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_WEBSITE
));
$installer->endSetup();
Now the module is enabled and new custom model is used instead of core Mage_Customer, but sql upgrade is not executed. any idea of what is wrong?
thanx luke