Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [customer-attribute]

Creating, managing and using Customer entity attributes

3
votes
0answers
26 views

Magento2 : How to add row/pattern type of customer attribute

How to add a row/pattern type of custom customer attribute (dynamic rows). We have the below attribute in Magento 1, we need to achieve the same in Magento 2. I don't find any code reference for this,...
1
vote
3answers
63 views

Magento 2.3 - How to add custom column to customer_entity table

I'm creating a Referral Program module, and I want to create a custom column inside the customer_entity table. The column is referred_by and it's a foreign key that as a relation with the ...
3
votes
2answers
41 views

Magento 2.3 - Add custom customer entity attribute with service contract

I have some problem to save custom customer entity attribute in database. I've created a Patch to add this attribute to the customer entity. The attribute is shown correctly in the backend, but when I ...
1
vote
0answers
22 views

how to save values to magento customer module default stored attributes in magento2? [on hold]

I have created new filed in Magento 2 registration form I want to save the values to default stored attributes (if Zip code => default in Magento 2 attributes) How to pass the values to that ...
1
vote
1answer
54 views

How to add second field in registration form in Magento 2?

I added one attribute using this code but when I try to add another attribute then it is not working why? <?php namespace Icore\Module\Setup; use Magento\Customer\Model\Customer; use Magento\...
1
vote
1answer
41 views

Magento 2 filter not working on custom customer attribute

I have created custom customer attribute. It is displaying in customer grid in admin panel but when I try to filter on my custom attribute, I get error SQLSTATE[42S22]: Column not found: 1054 ...
0
votes
0answers
15 views

Magento 2 How to Pre-fill Billing/Shipping address fields with customer account information data?

When Adding Billing/Shipping address I need to pre-fill the fields with customer account information data. I have created a custom Fax field as customer eav attribute so that it appears in ...
3
votes
0answers
29 views

Magento 2 How can I add State and Country attribute for customer in Admin?

How can I achieve State and Country field functionality in Admin under customer Account Information? I have referred this link to create in front-end https://magecomp.com/blog/create-country-...
3
votes
1answer
28 views

Magento 2 - Add Customer Attribute with Select Field

I'm trying to insert a customer attribute in magento 2 This is the InstallData script: use Magento\Framework\Setup\InstallDataInterface; use Magento\Framework\Setup\ModuleContextInterface; use ...
0
votes
0answers
26 views

Magento2 How to add country and state drop down in customer account information tab and display state based on country selected in admin

I need to integrate country and state fields for customers, I created them and listed successfully in frontend registration and profile. When working with admin I can see the two fields but the ...
1
vote
1answer
31 views

Custom address attribute: issue on display value magento 2

I have created a custom attribute for customer address. I can see the attribute on admin, I can insert value on frontend, the value saved successfully (and it displayed in address preview) however if ...
3
votes
2answers
25 views

How to validate Magento 2 form field input value with database table field to find out if already exists?

I have added following affiliate email field (custom attribute) to the customer registration form. Now I want to validate that if value already exists in the database table. <div class="control"&...
1
vote
3answers
44 views

How to get Customer attribute value by loading customer id in magento 2

I have customer entity id, how do i get customer attribute value by loading customer entity id, Please provide me a solution
1
vote
0answers
16 views

How to create a customer attribute only for one store?

I can create a customer attribute using below script: <?php namespace Vendor\CustomerMobileNumber\Setup; use Magento\Framework\Setup\InstallDataInterface; use Magento\Framework\Setup\...
0
votes
0answers
18 views

Magento2 Getting issue on Reindex SQLSTATE[42000]: Syntax error or access violation: 1070

Getting issue on Reindex, I was about to create a new customer attribute, How can i fix this, I also need is_used_in_grid = true Customer Grid indexer process unknown error: SQLSTATE[42000]: Syntax ...
1
vote
0answers
16 views

How to keep the customer custom attribute filled in case of validation error Magento 2

I have created an attribute in customer level from admin and when i submit the form and after validation, if any error occurs then it redirects to same form page with an error but the field is not pre-...
2
votes
2answers
20 views

Magento 2 custom customer attribute data not saved

We are working on Magento 2.2 create custom attribute seller_id for customer,this attribute is created successfully. But we can not display this attribute when loading the customer data. <?php ...
0
votes
1answer
24 views

How to display a dropdown -customer attribute- in customer registration form?

I still cannot figure out how to display the dropdown on the customer registration form at app/design/frontend/base/default/template/persistent/customer/form/register.phtml Any ideas how? Setup file:...
2
votes
0answers
16 views

How to create customer custom attribute for radio buttons in magento 2

I want to create customer custom attributes with following types: 1.radio buttons 2.checkbox Please provide me a solution to create customer custom attribute. If the checkbox contains more than 3 ...
1
vote
1answer
115 views

Attempt to load value of nonexistent EAV attribute for entity type Magento\Catalog\Api\Data\ProductInterface magento 2.3

Actually i am getting this error while editing products from product grid magento2.3 Actually i deleted some custom attribute using code as well as manually from backend after this i got ...
6
votes
1answer
107 views

Add option for custom select attribute on customer edit page Magento 2

I want to add my own custom option for an attribute.Please see attached image. Just guide me which files i need to create. I have just created one file for now. Please see code below, app/code/...
1
vote
0answers
14 views

How to call and place customer dropdown attribute in Customer Registration Page and One Step Checkout?

I have made a custom customer dropdown attribute like shown in the screenshot (through Silk Software). See Screenshot: I was wondering how to make show the dropdown in the customer registration form ...
0
votes
0answers
27 views

Magento 2 : Create file type customer attribute

I've created customer attribute with type 'file'. Below is my code. $attributesInfo = [ 'upload_documents' => [ 'label' => 'Upload Document', 'type' => '...
0
votes
1answer
12 views

Magento 2 Check a customer attribute is changed during save

I have created user Approve module which lets admin to approve user after registration. I want to send a email on activation and deactivation of a user, How can I find that the admin has changed the ...
0
votes
2answers
50 views

How to create customer custom Drop Down attributes in magento 2

Namespace/Module/setup/installData.php $customerSetup->addAttribute(Customer::ENTITY,'credit_type', [ 'type' => 'int', 'label' => '...
1
vote
2answers
99 views

How to convert this object data into array?

I have this Data Object value. Magento\Customer\Model\Data\AttributeMetadata Object ( [_data:protected] => Array ( [frontend_input] => boolean [input_filter] ...
0
votes
0answers
20 views

Add Customer custom attribute to invoice pdf

I want to add Customer custom attribute ( code : ice ) to invoice pdf in app/code/core/Mage/Sales/Model/Order/Pdf/Items/Invoice/Default.php can anybody help me ?
0
votes
0answers
20 views

Unable to get custom customer Address attribute value to customer grid

I've created custom customer address attribute through admin panel. Attribute value is inserting in customer_address_entity_int table. I'm able to see custom attribute in grid options but attribute ...
2
votes
1answer
80 views

Magento 2 - Customer Custom File Attribute unable to save

I have Created my own Customer Attribute, it was a File attribute. While try to upload a file in that, it shows error like, "<File Field Name>" is not a valid file. While checking in Media ...
0
votes
0answers
22 views

“Custom Attribute” is a required field Error Message - Custom customer Attribute on register user

Hello I added an custom customer attribute "kndnumber" to my register page. Attribute is successfully created in DB. My Problem is when I submit the user register request the error Messsage "...
0
votes
1answer
40 views

display mobile number in create an account page in magento 2

I want to display mobile number in create an account page in Magento 2. Iam editing below page with following code but it include address also in my create an account page, I just want telephone ...
0
votes
2answers
23 views

Magento 2 - InstallData script doesn´t add column to my 'customer_entitiy'

I´m now trying to add a custom attribute for like 5 hours now. It drives me nuts that I dont find the solution hope you can help me. I want a custom attribute to be displayed and saved when the user ...
0
votes
2answers
108 views

How to create customer custom attribute for radio buttons, checkbox in magento 2

I wish to create customer custom attributes with following types: 1.radio buttons 2.checkbox 3.dropdowns Please provide me a solution to create customer custom attribute.
1
vote
1answer
97 views

`upgradeData` to add a custom customer attribute is not working in `Magento2`

I've created few customer attribute using upgradeData.php. The content of the upgradeData.php is as below, <?php namespace Ucs\CustomerAttribute\Setup; use Magento\Customer\Model\Customer; use ...
2
votes
2answers
322 views

Magento 2: Custom Customer Attributes Showing in Customer Grid but Not Admin Account

I'm currently on Magento 2.2.6 and I created a multiple select attribute as well as a yes/no attribute for customers in the admin page, however I'm not seeing them show up and not sure where I went ...
0
votes
2answers
63 views

Magento 2 in frontend can not able to get the customer custom attribute value

I have created a custom customer attribute, and while create and update customer from backend the value will be saved in Database. But while do the same thing from front-end the value is not able to ...
0
votes
0answers
55 views

Export csv Not working for the custom attributes customer grid Magento2

Below showing code is my customer_listing.xml, export csv not working when selected checkbox's export from grid. <listing xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:...
0
votes
2answers
108 views

How to mass update custom dropdown customer attribute to all customers? PHP or SQL

I created a new customer attribute (Drop Down) and added it to the registration form. Attribute details found in eav_attribute table: Everything work as expected, attribute is added to the customer ...
0
votes
0answers
30 views

custom attribute save is not working during regsitration

I have created custom attribute, and i'm displaying those attribute in registration page. When user clicks on create an account i get values for custom attribute from post value. But when i tried to ...
3
votes
1answer
250 views

Add a custom attribute in grid customer magento 2

I have created an attribute type: select but i can't display it in the grid customer. the code of my customer_listing.xml <column name="customer_status"> <argument name="data" xsi:...
0
votes
0answers
66 views

Magento 2: Create Customer Attribute in Custom Save Controller

I have a custom module with a custom form in admin. On this form save action, I want to create customer attribute programmatically with the data fetched from the custom form. How can I do it. ...
0
votes
2answers
279 views

how to add city dropdown on checkout page instead of typing the city(M2)

I need to get rid of this company text field and Country drop down since the store serves locally. Important : How I can overide the city (text area) to a drop down with my own custom city list.?
0
votes
1answer
491 views

No such entity with customerId

I get this error when trying to register an account : No such entity with customerId = 13818 I think it might be some old custom attribute that is the root of the problem. How can I clean the ...
0
votes
1answer
29 views

How to get customer id using email-id without using objectManager in Magento 2.2.5

I have a customer-email on custom controller & want to get customer-id without using objectManager. how can I get? Currently, I'm getting using objectManger & here is the controller code:- ...
0
votes
0answers
56 views

In Magento 2.2.5 The Custom attributes values are not coming in Collection

In Magento 2.2.5, I am creating a Custom Product and Customer attributes. It is saving fine, but while retrieving, It is not coming in the Collection. Here is my Code. UpgradeData.php $eavSetup = $...
0
votes
0answers
12 views

Have any extension on Magento2 for customer attribute listing and edit like product?

I want same listing of customer attributes like product in magento2. Do have any extension we can directly achieve this?
0
votes
1answer
88 views

How to Hide/Show Customer attribute based on customer group in Admin panel Magento 2?

How to Hide/Show Customer attribute when the customer group is switched from general to the wholesale group?.
2
votes
1answer
44 views

Magento2 - adminhtml_customer not showing in Forms to Use In

I have programatically created a customer attribute and set it to be displayed in adminhtml_customer. All is good, the attribute is being displayed only in the admin customer edit section as desired. ...
3
votes
1answer
407 views

Save customer custom attribute in checkout

I'm really stuck with this thing. I added a customer address attribute with the following install data in my custom module <?php namespace Vendor\Module\Setup; use Magento\Framework\Setup\...
5
votes
2answers
394 views

Magento 2 : Unable to set custom customer attributes programmatically

I have a cron job that runs once a day, that reads a file uploaded to the server, and registers users from that file. The code works fine, but now I added a custom attribute to the customer (lets call ...