/ Published in: PHP
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<?php $installer = $this; $installer->startSetup(); 'type' => 'int', 'input' => 'select', 'label' => 'School', 'global' => 1, 'visible' => 1, 'required' => 0, 'user_defined' => 1, 'default' => '0', 'visible_on_front' => 1, 'source'=> 'profile/entity_school', )); { $customer = Mage::getModel('customer/customer'); $attrSetId = $customer->getResource()->getEntityType()->getDefaultAttributeSetId(); $this->addAttributeToSet('customer', $attrSetId, 'General', 'school'); } { Mage::getSingleton('eav/config') ->getAttribute('customer', 'school') ->setData('used_in_forms', array('adminhtml_customer','customer_account_create','customer_account_edit','checkout_register')) ->save(); } $installer->endSetup();
URL: http://www.excellencemagentoblog.com/customer-registration-fields-magento1-6