Adding custom registration fields in magento 1.5

孤街醉人 提交于 2019-12-07 08:16:25

You have also to register the attribute_id of new created attributes to the customer_form_attribute, so Magento knows where things are :-)

In your case you have to put this in your setup file: (Example taken form the Debit Payment Module)

// Get Customer Type ID
$read = Mage::getSingleton('core/resource')->getConnection('core_read');
$eid = $read->fetchRow(
    "select entity_type_id from {$this->getTable('eav_entity_type')} where entity_type_code = 'customer'"
);
$customer_type_id = $eid['entity_type_id'];

// Save Attribute to the customer_form_attribute
$attribute = $eavConfig->getAttribute($customer_type_id, 'registration_number');

// Here is where you determine in wich areas of magento the attributes are used
$attribute->setData('used_in_forms', array('customer_account_edit', 'customer_account_create', 'adminhtml_customer'));
$attribute->save();

Hope this helps :-)

ivan.proskuryakov

Or use this:

  1. Supports fields on Create Customer Account page
  2. Supports fields on Edit Customer Account page
  3. Supports fields on Checkout Registration page: standart onepage checkout - not a thirdparty onestep.

http://www.magentocommerce.com/magento-connect/catalog/product/view/id/16093/ http://www.magazento.com/english/magento-ext/magazento-extensions/custom-registration-filelds

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!