When you search for “Magento create customer attribute” or “Magento add attributes to customer,” you might be disappointed that the customer attributes are only available on enterprise edition. The community edition didn’t support the customer attribute system yet.
However, it is still better to clearly understand Magento 2 customer attributes in the enterprise edition. Together with SmartOSC to clarify the details Magento 2 Customer Attributes: The A – Z Guide for Dummies! through the following article.
What Are Customer Attributes?
Customer attributes are all the information associated with customers and appear as fields in front-end forms. Admin uses this information for customer management and order fulfilment.
Depending on your business, you may need to add more fields to the one provided by Magento.
Why Magento 2 Needs Customer Attributes?
Customer attributes are a powerful feature in Magento Enterprise. Customizing your customer data allows your business to capture unique customer information to serve your customer base better.
Thus, we come up with Magento 2 Customer Attribute extension that provides as good features as those of the Enterprise.
Add new customer attribute to Magento 2 helps the administrator easily manage and add attributes of a customer. It is possible to create different attributes, such as text field, text area, dropdown, multiple select, and date field.
You also can add them to the registration page, requiring more information from customers.
How To Create A New Customer Attribute In EE
Go to Stores ⇒ Attributes ⇒ Customer ⇒ Click Add New Attribute button.
1. Attribute Properties
Default Label: Enter the name of the attribute.
Attribute Code: Enter the code for an attribute. The code must begin with a letter, use lowercase letters (a-z) and number (0-9), less than 30 characters, and use underscore for space (_).
Ex: company_name, position_in_company
Input Type: Decide the type of input (text field, text area…)
Default Value: Enter a default value.
Input Validation: Set the type of data that is correct to enter into the field.
Input/Output Filter: Apply a filter to the input type. Choose one of the 3 options:
- Note: Does not apply a filter to the text entered into the field.
- Strip HTML Tags: Removes HTML tags from the text.
- Escape HTML Entities: Converts special characters found in the text to a valid HTML escape sequence.
Add to Column Options: Choose Yes to include the column in the Customer grid.
Use in Filter Options: Choose Yes to filter the Customers grid by the attribute.
Use in Search Options: Choose Yes to search the Customers grid by the attribute.
Use in Customer Segment: Choose Yes to make the attribute available to customer segments.
2. Storefront Properties
Show on Storefront: Choose Yes to make the attribute visible to customers.
Sort Order: Set the order of appearance.
Forms to Use: Include the attribute in the following forms: Customer Registration, Customer Account Edit, and Admin Checkout.
3. Attribute Labels/Options
Here is a list of default Magento 2 attributes.
How To Add Attribute To Customer Registration Page?
1. The Benefits Of Using Customer Attribute In Registration Fields
Understanding more about your customers help store owner develops a suitable marketing strategy.
However, just using the default attributes such as first name, last name, email, gender… won’t be enough to fulfil the store owner’s request for collecting additional information.
Therefore, you should follow the above guide to create new customer custom attributes to Magento 2 and add them to the Customer Registration page and Customer Account Edit page for easy and effective customer data collection.
Here is an example for you.
2. Step-By-Step On Adding Custom Registration Fields
- Create new customer attributes in the admin panel
Enter attribute label, choose input type (text field, text area, multiple lines, date, dropdown, multiple select, yes/no, file attachment, image field), show on the storefront, and add the new attribute in Customer Registration and Customer Account Edit.
- Specify values for the new attribute
- Add A new custom field on the Customer Registration page.
- Add A new custom field on the Customer Account Edit page.
- Add the custom field value to the Customer grid.
Magento 2 Customer Attributes Extension[Updated News]: Customer Attributes for Magento 2 Extension Newly Launched on BSSCommerce
Magento 2 Community Edition didn’t support adding extra attributes to the Registration Form. This function is only available for Enterprise Edition, so BSSCommerce has newly launched the Customer Custom Attributes extension for Magento 2 to meet the demand of Community users.
See more articles: https://www.smartosc.com/insights/magento-services-singapore
Magento 2 customer custom attributes extension provides all the necessary functions for creating extra fields and adding them to any Sign-up Form position. Besides 8 different input types, this extension also supports multiple store views when creating new customer-attributes.
Get advanced features of the EE right in EE at a reasonable price, not to mention the premium policies such as FREE installation, FREE 1-year support, and FREE lifetime update. What else to be hesitant about?
Article source: Magento Việt Nam