Magento 1.6-为注册页面添加自定义字段 [英] Magento 1.6 - Adding Custom Fields for Registration Page
问题描述
我想修改注册页面以添加可能包含的自定义字段
I want to modify the registration page to add custom fields which would potentially include
-
地址详细信息
Address Details
- 地址行1
- 地址行2
- 郊区
- 邮政编码
- 国家
- 状态
公司详细信息
- 名称,交易名称
- ABN,详细联系信息
我一直在阅读如何添加自定义字段,但是到目前为止,我一直没有成功,我只是对整个过程感到困惑.我只是想学习系统
I've been reading up on how to add custom fields, but I am having no success what-so-ever, I just get stumped on the whole thing. I'm just trying to learn the system
任何帮助将不胜感激
欢呼
推荐答案
看看customer_setup脚本以供参考.例如:
Take a look at the customer_setup scripts for reference. For example:
Mage/Customer/sql/customer_setup/mysql4-upgrade-1.4.0.0.0-1.4.0.0.1.php
此文件提供了有关如何将属性分配给客户地址表格(文件底部)的示例:
This file has an example of how to assign attributes to the customer address form (bottom of file):
Mage/Customer/sql/customer_setup/mysql4-data-upgrade-1.4.0.0.13-1.4.0.0.14.php
最佳做法是使用安装脚本创建一个新模块,然后将您的代码放入其中以添加自定义属性.
Best practices would be to create a new module with an install script, and put your code in there to add the custom attributes.
客户模型是EAV模型.在Magento中,EAV是一个复杂的主题.一个不错的练习是阅读有关创建EAV模块的知识-了解基础知识-然后返回添加自定义属性.
The customer model is an EAV model. EAV is a complicated subject in Magento. A good exercise would be to read up on creating a EAV module -- to understand the basics -- and then come back to adding custom attributes.
Enterprise允许您通过管理面板添加客户属性,但是不幸的是,对于CE来说更麻烦.
Enterprise allows you to add customer attributes via the admin panel, but unfortunately it's more of a pain for CE.
那应该让您入门.希望这会有所帮助.
That should get you started. Hope this helps.
这篇关于Magento 1.6-为注册页面添加自定义字段的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!