我正在運行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中的錯誤/信息消息?