Stack Exchange Network

Stack Exchange network consists of 174 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
Join us in building a kind, collaborative learning community via our updated Code of Conduct.

Creating, managing and using Customer entity attributes

0
votes
0answers
14 views

Add list of users with specific role as customer attribute

How can I add customer attribute similar to Group attribute but with users with specific user role? With this site > http://www.silksoftware.com/magento-module-creator/magento2x.php I generated ...
0
votes
1answer
20 views

New Customer Attribute with UpgradeData

I have used below code in my setup folder to create custom customer attributes, use Magento\Eav\Setup\EavSetup; use Magento\Eav\Setup\EavSetupFactory; use Magento\Framework\Setup\...
0
votes
0answers
10 views

Customer has no tokens error during customer update in Magento2

I am using below code in my controller to update customer from the post values: $userId = $this->getRequest()->getParam('user_id', false); $oldUser = $this->_getUser($userId); $...
0
votes
2answers
19 views

Customer custom attribute not saving while creating customer programmatically in magento 2.1.11

I am using following code to create customer in magento 2 programmatically namespace PackageName\ModuleName\Helper; use Magento\Framework\App\Bootstrap; include('app/bootstrap.php'); $bootstrap = ...
0
votes
0answers
19 views

Magento 2 Save custom customer attribute to customer addresses in checkout

There are many post on Stackexchange and blogs that explain how to add custom field to checkout forms. Some of them also explain how to save them to quote/order address. I've achieved all these ...
0
votes
1answer
25 views

Customer custom attribute not included in collection by default in edit account information

I've created a custom customer attribute "Skype", for more detail you can visit here:- http://nimb.ws/CrM0YF I've displayed & saved(in the backend) successfully this attribute on the ...
2
votes
1answer
49 views

magento 2.2.5: Adding Custom Attribute to Customer Edit Form in Admin

I am trying to add a custom attribute using below code but its not working - namespace A2bizz\Customer\Setup; use Magento\Customer\Setup\CustomerSetupFactory; use Magento\Customer\...
2
votes
1answer
154 views

Magento 2 : Display Customer Attribute in Grid

I have a Customer Attribute with Image Type. Its working Good all in all areas. I would like to display that attribute in Customer Listing same as Product Image. How to do this? Any ideas will be ...
0
votes
0answers
18 views

M 2.2 dropdown attribute in frontend form - populate options with attribute values in .phtml

I have a custom customer select attribute. It works just fine in the backend. Now I need to provide it as a dropdown field in my frontend (customer registration form). How can I add it to the form ...
0
votes
0answers
11 views

Magento 2: Hide Admin Attributes Based on other Attribute's Value

I've created some custom yes/no Customer Attributes in the admin area. Now I'm looking to hide some attribute fields if these are set to no For example, I have a yes/no attribute called ...
0
votes
2answers
23 views

Custom customer attribute not being created

I have written the following script to create a custom customer attribute in Magento 2.2.3. When I run setup:upgrade magento tells me data was installed but the attribute does not appear in ...
0
votes
0answers
23 views

M2 registration form custom customer select attribute in select box

I have a custom customer select attribute that I created with the following InstallData script. It works fine in the backend (customer account). I want it to be also in the customer registration form ...
0
votes
0answers
34 views

Magento 2.2: Add Customer Attribute to Custom Tab in Admin

I'm trying to a add some custom attributes to a custom tab I created in the Customer Admin page. I've created the custom tab with the following code: Vendor\MyModule\view\adminhtml\layout\...
0
votes
0answers
15 views

Add customer custom field to checkout review step

How can i add my custom field stored in "customer account information" on checkout review step just before place order in magento 1.9.*? this is my custom field setup code $installer = $this; $...
0
votes
0answers
16 views

Customer export not working after creating custom attributes for customer_address

I have a problem with Magento 1.9 customer export native functions. When I want to export the customers I get this error: Fatal error: Uncaught Error: Call to a member function getFrontendInput() ...
0
votes
1answer
56 views

Magento 2 : customer attribute not display at frontend while using print_r()

Hello Everyone, I have created a custom attributes for a customers it's working fine in admin also save data and get data while attributes have any certain value in textbox But if attribute ...
2
votes
2answers
322 views

Customer custom attribute not showing in admin form

I successfully add customer custom attribute for magento 2.2.5 like this: $setup->startSetup(); $insertArray = array( 'profile_picture' => array("type" => "varchar", "label" =&...
0
votes
1answer
32 views

Add customer attribute with yes/no option

I need to create custom Customer Attribute with Yes/No option. I successfully created ones with Text input previously. What I need now is, create a separate attribute for set if Customer is on Hold or ...
0
votes
2answers
38 views

Customer custome attribute value get by customer id in magento 1.9

Hi I have custom customer attribute for customer in my magento 1.9. I want that custom attribute value by customer id.
0
votes
1answer
47 views

Customer attribute is not being saved after migration

I have migrate database from Magento 1.9.3.1 to Magento 2.2.3 via data-migration-tool and it went without any errors in proccess. Everythink I need was mograted to new database. But I have noticed ...
0
votes
2answers
111 views

Magento2 : user define customer attribute not save value while create / save from admin

I have created two customer attribute one "abc" and second is "xyz" this two attribute display properly in customer admin. also attributes are created in database table "eav_attribute". But while save ...
1
vote
2answers
53 views

Add multiple customer attribute fields in Magento registration form

I am trying to add 2 customer attribute fields in my Magento registration form. The input names are the same in the register.phtml as in the install-1.0.0.php file. However I think there is something ...
0
votes
5answers
132 views

How to prevent “Call to a member function getValue() on null” when using getCustomAttribute()->getValue()?

My colleague wrote some code, which is hidden behind an interface: $myCustomValue = $customer->getCustomAttribute('my_custom_attribute')->getValue(); Working on integrations now, I invoke his ...
0
votes
1answer
53 views

Remove Validation for Last Name Field from all places

I want to remove validation from lastname field from admin panel as well as frontend in magento 2.1.12.Please tell me solution.
0
votes
1answer
23 views

Magento 2 : optimize customer attributes save code

i am trying to save data using customer attributes and the below code work fine, can i further optimize below code Thankyou <?php namespace Tatva\Loginpopup\Controller\Index; use Magento\...
1
vote
1answer
26 views

How order magento 2 EE customer custom attributes?

I'm using magento 2.1.7 EE and customer custom attributes creation in built, so I have added three attributes customer_title, customer_type and industry_type So I want to display all three categories ...
0
votes
0answers
34 views

Edit customer account information in admin magento2.2.2

I have created several customer attributes and which are showing in customer->accountinformation in admin panel. Now I want to change the order of this customer attribute and need to add ...
0
votes
1answer
36 views

How do I delete a customer attribute?

After a data migration, everything works besides my admin customer page. When I click I get an exception error. When contacting the author of the data migration tool he said I need to delete the ...
0
votes
0answers
20 views

How to create a new eav attribute in Magento 1 [duplicate]

How can I create a new EAV attribute for customer in Magento 1 using SQL script.
1
vote
1answer
112 views

Magento2 How to get the default attribute set id for Customer?

How to retrieve default attribute set ID for the customer? And also is it possible in the practical scenario to have multiple attribute sets for EAV entity type Customer? I know in the case of entity ...
0
votes
1answer
56 views

How to get customer custom dropdown value with text in magento2?

I have created customer custom attribute 'segments' with the below options: Options: SME, Reseller, Others I want get segments value with text based on the customer id in magento2. How to achieve ...
1
vote
1answer
189 views

How to get customer gender value with text in magento2?

I want get customer gender value like Male or Female in magento2? and also want to get gender attribute value like 1,2,3 text: Male, Female and Not Specified
2
votes
0answers
25 views

Magento integration test conflict with new customer eav attribute

I tried to run my integration test using bin/magento dev:tests:run integration but i always got an error like this: Module 'Company_CutomerExtraAttribute': Upgrading data... [Magento\Framework\...
1
vote
2answers
55 views

Customer dropdown values in phtml file

I created the one custom dropdown attribute in customer side. I need to show in frontend phtml all the dropdown list because a user can select any one of this. can anyone help me.
0
votes
1answer
24 views

Modify value of Firstname Customer

I have a custom attribute for customers but when I try to set any value to this attribute it does not save. I have this code: public function getAllow(){ $customer = Mage::getSingleton('customer/...
1
vote
1answer
117 views

Customer custom attribute not showing in magento2

I have created custom module for creating custom attribute in Magento2. I installed a custom module in local system there is working fine. My Local Magento version is 2.1.6, I installed this custom ...
0
votes
1answer
89 views

Manage Customer Attributes in Magento 2.2 Backend

As mentioned in the Magento 2 Dev Docs, there is an admin section to manage customer attributes. On the Admin sidebar, tap Stores. Then under Attributes, choose Customer. I looked for this section ...
1
vote
1answer
90 views

Magento2:How to updated customer attribute programmatically?

I am using magento2. I have created customer custom attribute in magento2.I want to change labels of created customer custom attribute. i have created two files installData.php and upgradeData.php in ...
1
vote
0answers
24 views

How to use customer attribute for the not logged in customer (Guest Customer)?

Is there any why with which we can use customer attribute for the guest customer. Like I have a news letter with which I am getting subscriber Email, Name, D.O.B., Country, but the thing is all this ...
0
votes
2answers
43 views

M2 Show custom customer select attribut in frontend registration form

I have a custom customer select attribute and want to include it in my customer registration form on the frontend. Can anybody help with the frontend part? Thanks!
0
votes
1answer
81 views

Customer account creation, save boolean value in attribute

So, as the title says, i've added some new attributes in my customer entity, one of which is a boolean, as you can see from the code in setup/InstallData.php $customerSetup->addAttribute(\Magento\...
0
votes
0answers
73 views

M2 Custom Customer Attribute select in Customer registration form

I have created a custom customer attribute. So far so good. Here is my InstallData.php. public function install(ModuleDataSetupInterface $setup, ModuleContextInterface $context) { $...
0
votes
1answer
223 views

Customer Custom Attribute and Save Value when Save Customer

I have to add custom Dropdown attribute to customer. Which have 3 options like Pending, Approved and Disapproved. So when we save customer i have to save this field value. For this i have added field ...
0
votes
1answer
50 views

InstallData Attribute showing only on the frontend and not in customer_entity table

I have created a module with setup/installdata.php and layout & template files, but the custom attribute is showing up only on the frontside on customer account create form. Am i missing something?...
2
votes
1answer
213 views

Magento 2: Add attribute to customer grid

I want to show an custom attribute in the customers grid. I created the customer attribute via upgrade script. The attribute is shown in adminhtml_customer so I can save values for this attribute. ...
0
votes
2answers
114 views

How to manage InstallData.php File in magento 2

How can I manage my InstallData.php file when I want to create multiple attribute for customer and product? Here, in my InstallData file I have create an attribute for the product. namespace ...
0
votes
1answer
30 views

How to over ride the folder in magento2

I need some help. How to override the magento2 enterprise edition folder to app/design theme folder "module-customer-custom-attributes". Anyone, please help me.
3
votes
2answers
41 views

Only allow 6 digit number as customer password

Is there a way to make magento 2 only allow 6 digit number format as customer password?
0
votes
0answers
42 views

ui_component form custom tab attribute

I have created a custom customer attribute that is shown in the tab with all the general information when you edit the customer. Now I need to get that attribute inside a custom tab that I have ...
0
votes
0answers
28 views

Custom tab + Custom Attribute * ui_component

So i have made a custom tab in the customer form customer_form.xml <form xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Ui:...