2016-03-16 51 views
0

是否有任何方法可以确定哪些客户实际注册了一个帐户并在Magento中拥有密码(与来宾结帐客户相对)?具体而言,我试图确定这些信息可能存储在数据库中的位置,或者我如何能够以编程方式确定这些信息。在Magento中以编程方式确定注册客户

我们正在迁移到一个新的购物车,只希望为在Magento上真正拥有帐户的用户在新购物车上制作“帐户”。如果我们甚至为那些做过客人结账的人开立账户,人们可能在新网站上拥有账户,甚至不知道账户。

回答

2

您可以在customer_entity表中找到所有注册的客户。

如果你想通过数据库导出所有的客户请务必导出以下的表,以及:

customer_address_entity
​​
customer_address_entity_decimal
customer_address_entity_int
customer_address_entity_text
customer_address_entity_varchar
customer_eav_attribute
customer_eav_attribute_website
customer_entity
customer_entity_datetime
customer_entity_decimal
​​
customer_entity_text
customer_entity_varchar
customer_form_attribute

如果你想通过代码来做到这一点,你可以得到这样的所有注册用户:

$collection = mage::getModel('customer/customer')->getCollection(); 
1

当客户使用客人结帐在Magento下订单时,客户信息仅存储在报价和订单中。在这种情况下,系统中不会创建客户。

因此,所有客户都已亲自创建帐户,在结帐期间注册或从管理员创建帐户。

因此,如果您没有任何在客人结帐时创建客户的自定义,则可以迁移所有客户。

DB: customer_entity,customer_address_entity和相应的eav属性的所有记录。

PHP: 使用集合

Mage::getModel('customer/customer')->getCollection()->addAttributeToSelect('*');

Mage::getModel('customer/address')->getCollection()->addAttributeToSelect('*');

相关问题