Questions tagged [customer-attribute]

Creating, managing and using Customer entity attributes

Filter by
Sorted by
Tagged with
0 votes
0 answers
11 views

magento 2 change multiselct to ui select for custom customer attribute

I want to create a UI select in the customer account area in ADMIN for custom attributes. something like this -> https://dolphinwebsolution.com/magento-2-add-ui-select-component-with-search-filter-...
jibin george's user avatar
0 votes
1 answer
89 views

Magento2: Issue with the customer custom attribute and custom tab in product view

This is the code snippet responsible for adding new attribute public function createAllowRequestSampleCustomerAttribute($setup) { $code = 'allow_request_sample'; /** @...
Dramorian's user avatar
0 votes
1 answer
45 views

Customer custom attributes do not save data to customer_entity table

I'm creating a rest API and I need to add a custom columns to the customer_entity table and save the value in that fields within API request. Сreated new attributes in the customer_entity table using ...
David's user avatar
  • 21
1 vote
1 answer
116 views

Custom customer attribute not save 2.4.6

I have created customer attribute with custom source model, I am getting below error , the same code is working fine with 2.4.5 I am getting below error while saving in admin Attribute attribute_code ...
Murtuza Zabuawala's user avatar
0 votes
0 answers
30 views

Magento Customer Attribute Value Multi Website Issue

I have multi website setup and, I have create one Custom Customer Attribute named "mobile_number", that shows on create account form at frontend. Now the issue is while creating customer in ...
Jantar Mantar's user avatar
0 votes
1 answer
56 views

Magento 2 How to add Customer address attribute value under set Shipping Address on Checkout Page

I have create one custom field on Customer address form and save it's value on customer address attribute in customer_address_entity_text table. Now, When I go to Checkout Page then need to display ...
Keval Chauhan's user avatar
0 votes
0 answers
6 views

How to show link instead of text field in customer edit form in admin?

I have created a customer attribute, where customers add a url of there store. I want to show that url as a clickable link in admin customers form. Is this possible and how?
Seefan's user avatar
  • 540
0 votes
3 answers
78 views

How to persist the value of a custom field on the customer_entity table?

I'm new to Magento 2 and to this forum. I'm trying to add a newsletter subscription on the customer menu, just after the core one. For that, i created a module "ACME_Newsletter" I added a ...
jlegrand79's user avatar
0 votes
0 answers
40 views

Can we add custom fields to "Edit" Customer form using ui-components?

I came accross this link https://webkul.com/blog/tab-with-form-in-admin-customer-edit-magento-2/ , but here they have not used ui_components.I want to add one enable/disable field and one "number&...
Magento beginner's user avatar
1 vote
0 answers
44 views

How to create dynamicRows to the custom customer attribute Magento 2

I have created a custom dynamic row in the customer information tab. but it is not saving data in the table.
Priya's user avatar
  • 87
5 votes
1 answer
303 views

Magento 2 : How to upload file using Rest Api

I want to upload file using REST Api. As per my reserch there are two ways for this. by passing base64 encoded string into form-data by passing file upload parameter into form-data But I am confused ...
Krupa Popat's user avatar
1 vote
1 answer
1k views

Custom Customer Attribute field data not showing in Customer Account Information

I have added the field "Favorite Color" to the Customer entity and added it to the registration form. The field properly stores data, as I can see when logging in as Admin and checking in ...
dotancohen's user avatar
  • 1,115
2 votes
1 answer
79 views

unable to get the Customer Custom Attribute value in customer_register_success event in magento 2

In my project a custom customer attribute was using and save the value in the table on customer registration. Attribute id was phone_number I want to get this phone number value and send an sms using ...
Mujahidh's user avatar
  • 2,791
0 votes
1 answer
524 views

How to add Multiple validation rule

I have to add three validation rule and as you see below code works well for one rule : validation-mixin.js define([ 'jquery' ], function ($) { "use strict"; console.log('this is ...
Peren's user avatar
  • 27
0 votes
1 answer
46 views

How to create a custom address attribute for customer and show that in edit address in admin?

I want to create a custom customer address attribute called customer_custom_id in the below address.( check the below image.). how can I do that?
Mohmad Ashik M A's user avatar
1 vote
1 answer
131 views

add categories tree to customer eav attribute

I'm trying to create an EAV attribute for the customer, and I need the input to be the product categories tree like the following image: Is this acheivable? And how? please.
AboElnouR's user avatar
  • 213
0 votes
1 answer
296 views

How can we add custom customer attributes in admin grid

I have created an attribute type: Test but I want to display in the grid customer. https://prnt.sc/aRyraGEP7kKf
kiran's user avatar
  • 597
1 vote
2 answers
161 views

Showing customer eav attrribute in product page always shows cached data

I've created a customer EAV attribute and trying to show this attribute on the product details page but it always returns chaced data till I run bin/magento cache:flush full_page. I've tried to use ...
AboElnouR's user avatar
  • 213
0 votes
2 answers
249 views

Get customer custom attribute value without loading the customer

I'm trying to get custom customer attribute value (for attribute code abn_no) without loading the customer but not able to find any way to get it. Is there any way to get custom customer attribute ...
quickshiftin's user avatar
0 votes
1 answer
222 views

Magento 2 get custom customer attribute displayed value

I'm using the module Amasty's customer Attributes to create custom customer attributes, I like to get custom attribute displayed value but i got the option value. I like to get the value in data-title ...
tarek fellah's user avatar
0 votes
1 answer
449 views

Custom multi select filter issue for the customer grid

I've made a custom multiselect customer attribute. The attribute code is: email_preference. I've added this code to get a multiselect filter in the app/code/Vendor/Customer/view/adminhtml/ui_component/...
Attila Naghi's user avatar
  • 3,963
0 votes
1 answer
76 views

"Wrong entity ID" error when adding 2 new customer attributes

Magento 2.2.8 I am trying to add a text and multiselect attribute to the customer. Here is my code: namespace Foobar\CustomerFields\Setup; use Magento\Framework\Setup\ModuleContextInterface; use ...
user4095519's user avatar
0 votes
2 answers
535 views

How to make custom customer attribute filterable in the customer grid?

I've made a patch and this is the code for creating my customer custom attribute: public function apply() { $this->moduleDataSetup->getConnection()->startSetup(); /** @var ...
Attila Naghi's user avatar
  • 3,963
1 vote
1 answer
21 views

Getting the right format for saving multiselect customer attribute issue?

This is my code: $values = ['value1','value2','value3']; $customer->setCustomAttribute('customer_attribute_code', $values); //\Magento\Customer\Api\...
Attila Naghi's user avatar
  • 3,963
0 votes
1 answer
74 views

Create custom customer attribute magento2

I am trying to create custom attribute for customer , but it is not creating anything i cannot able to view in admin here is my code <?php namespace Test\Hd\Setup; use Magento\Framework\Setup\...
vellai durai's user avatar
0 votes
2 answers
3k views

Call to undefined method Magento\Customer\Model\ResourceModel\CustomerRepository\Interceptor::getByEmail() magento2

I am trying to update custom attribute in magento2 but i am getting error while running this <?php namespace test\Org\Controller\Result; use Magento\Framework\App\Action\Context; ...
vellai durai's user avatar
0 votes
1 answer
423 views

Update customer custom attribute in magento2 programatically

I need to update custom attribute based on response from external API ,How to update the custom attribute from controller , here is my controller code <?php namespace test\Org\Controller\Result; ...
vellai durai's user avatar
0 votes
1 answer
105 views

Magento 2 How add to custom attribute placeholder only on create account page?

I cannot figure out how I can add placeholder for some custom attribute on create account page. In this file: view/frontend/templates/customer/form/register.phtml i see some code which output html for ...
David Young's user avatar
0 votes
1 answer
440 views

How to remove custom attribute value from magento 2 using setup script?

In Magento 2.x, If I have created a custom attribute and then need to remove that attribute and also need to remove that attribute value that is assigned to that entity. How can I do programmatically (...
Hiren Patel's user avatar
0 votes
1 answer
667 views

How can I get custom customer code from javascript in Magento 2?

I added a custom customer attribute to the eav_attribute table. I am trying to get this from within js. For example, I can get this.customer.firstname but I can't get it like this this.customer....
Mehmet Akif TEZCAN's user avatar
0 votes
0 answers
193 views

Magento 2: How to validate duplicate data on customer CSV import

I would like to validate duplicate data for one attribute for customer import file. I am trying to check it in Magento\CustomerImportExport\Model\Import\Customer class with validateRow function but in ...
magento stacker's user avatar
1 vote
2 answers
3k views

Magento 2 does not allow Special characters in First Name & Last name even though the Input Validation is None

In my magento setup I am not able to insert special characters for customer First name and Last name. The Input Validation for Customer Attribute First Name and Last Name is NONE. But still Magento 2 ...
Kaushik Kumar Roy's user avatar
0 votes
1 answer
487 views

Creating a new attribute to Customer Entity - Throwing Error

I am creating a new attribute (mobile) for the Customer Entity. The attribute should be of type 'static' since this one is a required field and for easy retrieval. I came to know that it requires 2 ...
Harish ST's user avatar
  • 201
1 vote
2 answers
493 views

How to get attribute information of a custom field in registration form

I have created a custom attribute for customer in Magento 2 site. The HTML of the field is this: <input type="text" name="<?= $block->escapeHtmlAttr($...
jstuardo's user avatar
  • 609
0 votes
1 answer
297 views

Adding a customer custom attribute

I have a system where custom attributes were added in customer_grid_flat table. That way, those attributes appear in Account Information tab of customer administration pages. However, when I try to ...
jstuardo's user avatar
  • 609
1 vote
0 answers
308 views

How to upload image/file using custom customer attribute with Rest API Magento 2?

I have create one custom customer attribute with file type. I want to upload file using rest API and want to store it to custom media path. How to upload file is with customer registration API?
Rutvee Sojitra's user avatar
0 votes
1 answer
146 views

Update Customer's Custom Attribute after is successfully placed

I created a customer attribute called "new_customer" with a value of 1 YES. Once an order is successfully placed by the customer, I want update the customer's custom_attribute "...
Koua Thao's user avatar
0 votes
3 answers
778 views

Magento2 getting error after removing/deleting custom module

Magento2 getting error after removing custom module. In this module I have created a custom customer attribute. ERROR: Class Test\Test\Model\Customer\Attribute\Source\TestAttribute does not exist [] []...
Arjun's user avatar
  • 3,566
1 vote
0 answers
51 views

Magento2 Need to get Customer details & customer custom attribute value while creating new order via admin

Magento2 How can I get the customer details & customer custom attribute while creating new order from admin As using the customer custom attribute value I need to restrict payment method from ...
Arjun's user avatar
  • 3,566
0 votes
1 answer
137 views

How to get custom product attribute from productCollection

I use magento 2.4. I have product collection in catalog view. There I have loop: $_productCollection = $block->getLoadedProductCollection(); . . . <?php /** @var $_product \...
user2217288's user avatar
-1 votes
1 answer
604 views

Added custom customer attribute with patch script but it gives an error

I added a custom attribute to my customer with a data patch script. The attribute is added in the database tables but when I try to register a new customer I get this error: main.CRITICAL: Exception ...
amjada's user avatar
  • 11
-1 votes
2 answers
1k views

Adding custom customer attribute with declarative schema and db_schema

I added a custom attribute in de customer_entity table with db_schema.xml. I can get the value of that attribute with getdata('debtor_id') but I can't set it with setData('debtor_id' ,2). Did I miss a ...
amjada's user avatar
  • 11
1 vote
1 answer
49 views

How to add AND OR AND conditions in a product collection?

ORIGINAL POST Comment ajouter des conditions ET OU ET dans une collection de produits? comment pourrais filtrer une collection de produit par: (attribut A : condition A And attribut A : condition B) ...
Abdallah JARRAY's user avatar
0 votes
2 answers
724 views

Unable to save value of customer attribute in magento2

I am trying to edit customer form data in which i have added one contact number as attribute in form. On removing the text from contact number and then saving it i am not able to save null or empty ...
Unknown's user avatar
  • 581
0 votes
1 answer
378 views

How to get customer custom multi select attribute value in magento 2

I have created a customer multi-selected attribute but I am not able to get its value on checkout can you please guide me on how can I get it. I try these two solutions but it not work. $customer = $...
Muhammad Hamza's user avatar
0 votes
1 answer
863 views

How to update new value field on customer_entity table?

I am new to magento 2, and I would like to know how to update an added field in the customer_entity table, I have created a popup form with sending the information through post jquery, and the ...
Diego Castro's user avatar
0 votes
1 answer
391 views

Magento2: Cannot get the attribute value with cache enabled

I want to show the Product price and Add to Cart in product listing page when only we set custom attribute value as Approved. So, I have overridden the ListProduct block and written a function for ...
MagentoDev's user avatar
0 votes
1 answer
92 views

Exception Error on Success Page Module

I am currently attempting to modify my version of Magento ver. 2.3.4 by creating a new module to inject a custom attribute into the checkout success page. The code in the files is as follows ...
CJNotts's user avatar
  • 392
0 votes
1 answer
733 views

Customer custom attribute value did not save using rest api in magento 2.3?

Customer custom attribute value did not save using rest API in Magento 2.3? API URL: http://127.0.0.1/magento2/rest/V1/customers Method: POST My POST JSON request data is : { "customer": ...
Devidas's user avatar
  • 3,328
1 vote
1 answer
2k views

Magento 2 : Get a custom customer attribute to appear on the checkout success page

I've recently created a customer attribute for my Magento ver. 2.3.5-p1 instance using the following blog: https://www.blog.sashas.org/magento-2-1-3-how-to-make-customer-attribute-update.html The ...
CJNotts's user avatar
  • 392

1
2 3 4 5
10