我正在运行Magento 1.7.2。我想知道magento注册用户详细信息存储在哪里。实际上,我需要,如果我们添加一个新的字段在注册表单中的字段的值存储在数据库表中。magento注册用户详细信息存储在哪里
0
A
回答
4
以下是用户详细信息存储表的列表。
| customer_address_entity |
| customer_address_entity_datetime |
| customer_address_entity_decimal |
| customer_address_entity_int |
| customer_address_entity_text |
| customer_address_entity_varchar |
| customer_entity |
| customer_entity_datetime |
| customer_entity_decimal |
| customer_entity_int |
| customer_entity_text |
| customer_entity_varchar |
和属性都存储在下面的表格
customer_eav_attribute
2
通过创建客户属性这样做的最佳方式。
您可以通过下面的下面的步骤做:
/app/code/local/Your/Customattribute/sql/your_customattribute_setup/install-0.1.0.php
<?php
$installer = $this;
$installer->startSetup();
$setup = new Mage_Eav_Model_Entity_Setup('core_setup');
$entityTypeId = $setup->getEntityTypeId('customer');
$attributeSetId = $setup->getDefaultAttributeSetId($entityTypeId);
$attributeGroupId = $setup->getDefaultAttributeGroupId($entityTypeId, $attributeSetId);
$installer->addAttribute("customer", "customattribute", array(
"type" => "varchar",
"backend" => "",
"label" => "Custom Attribute",
"input" => "text",
"source" => "",
"visible" => true,
"required" => false,
"default" => "",
"frontend" => "",
"unique" => false,
"note" => "Custom Attribute"
));
$attribute = Mage::getSingleton("eav/config")->getAttribute("customer", "customattribute");
$setup->addAttributeToGroup(
$entityTypeId,
$attributeSetId,
$attributeGroupId,
'customattribute',
'999' //sort_order
);
$used_in_forms=array();
$used_in_forms[]="adminhtml_customer";
//$used_in_forms[]="checkout_register";
//$used_in_forms[]="customer_account_create";
//$used_in_forms[]="customer_account_edit";
//$used_in_forms[]="adminhtml_checkout";
$attribute->setData("used_in_forms", $used_in_forms)
->setData("is_used_for_customer_segment", true)
->setData("is_system", 0)
->setData("is_user_defined", 1)
->setData("is_visible", 1)
->setData("sort_order", 100)
;
$attribute->save();
$installer->endSetup();
/应用程序/代码/地方/你/ Customattribute的/ etc/config.xml中
<?xml version="1.0"?>
<config>
<modules>
<Your_Customattribute>
<version>0.1.0</version>
</Your_Customattribute>
</modules>
<global>
<resources>
<Your_Customattribute_setup>
<setup>
<module>Your_Customattribute</module>
<class>Mage_Customer_Model_Entity_Setup</class>
</setup>
<connection>
<use>core_setup</use>
</connection>
</Your_Customattribute_setup>
<Your_Customattribute_write>
<connection>
<use>core_write</use>
</connection>
</Your_Customattribute_write>
<Your_Customattribute_read>
<connection>
<use>core_read</use>
</connection>
</Your_Customattribute_read>
</resources>
</global>
</config>
应用程序的/ etc /模块/ Your_Customattribute.xml
<?xml version="1.0"?>
<config>
<modules>
<Your_Customattribute>
<active>true</active>
<codePool>local</codePool>
<version>0.1.0</version>
</Your_Customattribute>
</modules>
</config>
然后检索或编辑你使用:
$customer = Mage::getModel('customer/customer')->load($custid);
$customer->getCustomattribute();
$customer->setCustomattribute($yourjson);
相关问题
- 1. 用户注册信息在哪里?
- 2. 将注册详细信息注入TwitterKit
- 3. 哪里存储MVC 4注册用户?
- 4. 如何将我的注册详细信息存储在本地存储中?
- 5. Magento在哪里存储用户锁定的信息?
- 6. 哪里存储用户登录信息?
- 7. 哪里存储用户登录信息?
- 8. 如何检索用户注册的详细信息到网页?
- 9. 无法将用户注册详细信息插入数据库
- 10. drupal注册重定向和用户详细信息
- 11. magento保存管理详细信息
- 12. 在cookie中存储详细信息
- 13. 在JavaScript中存储详细信息
- 14. 在应用程序变量中存储用户详细信息
- 15. 如何轻松存储用户帐户详细信息?
- 16. 将用户详细信息存储在字典中
- 17. 在MSI中存储用户详细信息
- 18. 哪里可以保存EmberJS应用程序的详细用户会话信息?
- 19. 请求用户权限后,我在哪里检索用户的详细信息?
- 20. 存储配置详细信息
- 21. 存储过程创建详细信息
- 22. 存储过程日志详细信息
- 23. 从URL存储产品详细信息
- 24. Magento注册表数据存储在哪里?
- 25. 注册服务器在哪里存储?
- 26. 使用NSUserDefaults存储Facebook用户详细信息
- 27. Crystal Reports详细信息详细信息
- 28. Android主详细信息详细信息
- 29. 将信息存储在未注册的客户用户
- 30. 哪里存储用户在PHP中的错误/信息消息?