Hello my dearest friends,
Here we are again, meeting up in Magento Tutorials after one week. Before we proceed further, let me ask you a very simple question: “What is the basic difference between a successful and an unsuccessful business?” A business is successful only when its products and services have enough buyers in the market. Yes, there are several other parameters also but customers play a crucial role in deciding the success and failure of an organization. And with such a large number of customer in your system, how can you handle them? Magento helps manage customer easily and conveniently.
1. Customer Entity
Similar to product, Magento uses EAV model to keep customer’s information. The main table to store customer data is customer_entity.
Besides EAV tables, customer’s attributes have an additional table (customer_eav_attribute), you can add validate required to an attribute:
If you want to add attributes in customer’s data, you can use the customer setup class (Mage_Customer_Model_Entity_Setup):
In addition, if you want to show your custom attribute on edit form in backend, you need to add attribute to customer form attribute:
2. Magento Customer Address
Magento designs multiple addresses option for one customer. In checkout process, customer address is converted to billing address and shipping address. The billing address is often used to calculate the tax for order, the shipping address is always used to calculate the shipping fee. Magento configures fields that convert from customer address to order address in config.xml file:
customer_id * *