Magento, technical stuff, treasures I discover while digging in the code

Magento

EAV attributes, default values and source models

EAV Attribute I tried to add an EAV attribut [http://www.magentocommerce.com/knowledge-base/entry/magento-for-dev-part-7-advanced-orm-entity-attribute-value] , set a default value and that without using a source model, set this options: $this->addAttribute('customer', 'customer_type', array( 'type' => 'int' 'option' => array('values' => array('Customer', 'Artist')) 'default' => 'Customer', [...] ); Default value Magento adds
1 min read