Magento 2: Save custom customer attribute value programmatically
How can I save a custom Customer Attribute value programmatically?
I have tried below code but it didn't work.
protected $customer;
public function __construct(
MagentoCustomerModelCustomer $customer
)
{
$this->customer = $customer;
}
...
...
$customerId = "1";
$customer = $this->customer->load($customerId);
$data = "customer attribute value";
$customerData = $customer->getDataModel();
$customerData->setCustomAttribute('customer_attribute_code',$data);
$customer->updateData($customerData);
$customer->save();
Is there any other method to save the customer attribute?
magento2 customer customer-attribute
add a comment |
How can I save a custom Customer Attribute value programmatically?
I have tried below code but it didn't work.
protected $customer;
public function __construct(
MagentoCustomerModelCustomer $customer
)
{
$this->customer = $customer;
}
...
...
$customerId = "1";
$customer = $this->customer->load($customerId);
$data = "customer attribute value";
$customerData = $customer->getDataModel();
$customerData->setCustomAttribute('customer_attribute_code',$data);
$customer->updateData($customerData);
$customer->save();
Is there any other method to save the customer attribute?
magento2 customer customer-attribute
add a comment |
How can I save a custom Customer Attribute value programmatically?
I have tried below code but it didn't work.
protected $customer;
public function __construct(
MagentoCustomerModelCustomer $customer
)
{
$this->customer = $customer;
}
...
...
$customerId = "1";
$customer = $this->customer->load($customerId);
$data = "customer attribute value";
$customerData = $customer->getDataModel();
$customerData->setCustomAttribute('customer_attribute_code',$data);
$customer->updateData($customerData);
$customer->save();
Is there any other method to save the customer attribute?
magento2 customer customer-attribute
How can I save a custom Customer Attribute value programmatically?
I have tried below code but it didn't work.
protected $customer;
public function __construct(
MagentoCustomerModelCustomer $customer
)
{
$this->customer = $customer;
}
...
...
$customerId = "1";
$customer = $this->customer->load($customerId);
$data = "customer attribute value";
$customerData = $customer->getDataModel();
$customerData->setCustomAttribute('customer_attribute_code',$data);
$customer->updateData($customerData);
$customer->save();
Is there any other method to save the customer attribute?
magento2 customer customer-attribute
magento2 customer customer-attribute
edited Nov 7 '17 at 11:09
asked Nov 7 '17 at 11:03
Dinesh Yadav
3,8201937
3,8201937
add a comment |
add a comment |
4 Answers
4
active
oldest
votes
I have got the solution
protected $customer;
protected $customerFactory;
public function __construct(
MagentoCustomerModelCustomer $customer
MagentoCustomerModelResourceModelCustomerFactory $customerFactory
)
{
$this->customer = $customer;
$this->customerFactory = $customerFactory;
}
...
...
$customerId = "1";
$customer = $this->customer->load($customerId);
$data = "customer attribute value";
$customerData = $customer->getDataModel();
$customerData->setCustomAttribute('customer_attribute_code',$data);
$customer->updateData($customerData);
$customerResource = $this->customerFactory->create();
$customerResource->saveAttribute($customer, 'customer_attribute_code');
1
This code not working in magento 2.2.3, please suggest if you have any alternate solution please share as I want to save custom customer address attribute value programmatically.
– Purushotam Sharma
Mar 28 '18 at 13:26
1
@Dinesh , Best Solution ever I got. Working for all types ofcustomer attributes
.
– TBS Mage
Jun 19 '18 at 7:07
2
@TBSMage, Thank you for your valuable comment :)
– Dinesh Yadav
Jun 19 '18 at 7:33
I have created attribute of type int, that is not saving if i use below code $customerData->setCustomAttribute('customer_check', 1);
– jafar pinjar
Aug 28 '18 at 8:50
add a comment |
Some times, you may need to save multiple attributes at the same time. After go through the Magento code, I endup with this code. Here medicare_number and medicare_reference are custom attributes.
$customerModel = $this->_customerFactory->create();
$customerModel->getResource()->load($customerModel, $customerId);
$customerModel->setData('dob', $this->getRequest()->getParam('dob'))
->setData('gender', $this->getRequest()->getParam('gender'))
->setData('medicare_number', $this->getRequest()->getParam('medicare_number'))
->setData('medicare_reference', $this->getRequest()->getParam('medicare_reference'))
->setAttributeSetId(MagentoCustomerApiCustomerMetadataInterface::ATTRIBUTE_SET_ID_CUSTOMER);
$customerModel->getResource()->save($customerModel);
this is working in 2.2.5, tried dozens of other answers but none of them work, thank you!
– stetoc
Aug 30 '18 at 19:42
short version for working code is something like$customer->setData('my_attribute', 1234) ->setAttributeSetId(MagentoCustomerApiCustomerMetadataInterface::ATTRIBUTE_SET_ID_CUSTOMER)->getResource()->save($customer)
– stetoc
Aug 30 '18 at 19:43
add a comment |
protected $customer;
protected $customerFactory;
public function __construct(
MagentoCustomerModelCustomer $customer
MagentoCustomerModelResourceModelCustomerFactory $customerFactory
)
{
$this->customer = $customer;
$this->customerFactory = $customerFactory;
}
...
...
$mobile="1234567890";
$custom = $this->_customerFactory ->create();
$custom = $custom->setWebsiteId($helperData->getWebsiteId());
$custom = $custom->loadByEmail("abc123@xyz.com");
$customerData = $custom->getDataModel();
$customerData->setCustomAttribute('custom_attribute code', $mobile);
$custom->updateData($customerData);
$custom->save();
add a comment |
You need to do it the strange Magento 2 way:-
public function __construct(
MagentoCustomerApiCustomerRepositoryInterface $customerRepository,
) {
$this->_customerRepository = $customerRepository;
}
public function execute()
{
$customer = $this->_customerRepository->getById($customerId);
$customer->setDob($data['dob'])
->setCustomAttribute('medicare_number',$data['medicare_number'])
->setCustomAttribute('medicare_reference',$data['medicare_reference'])
->setCustomAttribute('medicare_exp',$data['medicare_exp']);
$this->_customerRepository->save($customer);
}
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "479"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f200361%2fmagento-2-save-custom-customer-attribute-value-programmatically%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
4 Answers
4
active
oldest
votes
4 Answers
4
active
oldest
votes
active
oldest
votes
active
oldest
votes
I have got the solution
protected $customer;
protected $customerFactory;
public function __construct(
MagentoCustomerModelCustomer $customer
MagentoCustomerModelResourceModelCustomerFactory $customerFactory
)
{
$this->customer = $customer;
$this->customerFactory = $customerFactory;
}
...
...
$customerId = "1";
$customer = $this->customer->load($customerId);
$data = "customer attribute value";
$customerData = $customer->getDataModel();
$customerData->setCustomAttribute('customer_attribute_code',$data);
$customer->updateData($customerData);
$customerResource = $this->customerFactory->create();
$customerResource->saveAttribute($customer, 'customer_attribute_code');
1
This code not working in magento 2.2.3, please suggest if you have any alternate solution please share as I want to save custom customer address attribute value programmatically.
– Purushotam Sharma
Mar 28 '18 at 13:26
1
@Dinesh , Best Solution ever I got. Working for all types ofcustomer attributes
.
– TBS Mage
Jun 19 '18 at 7:07
2
@TBSMage, Thank you for your valuable comment :)
– Dinesh Yadav
Jun 19 '18 at 7:33
I have created attribute of type int, that is not saving if i use below code $customerData->setCustomAttribute('customer_check', 1);
– jafar pinjar
Aug 28 '18 at 8:50
add a comment |
I have got the solution
protected $customer;
protected $customerFactory;
public function __construct(
MagentoCustomerModelCustomer $customer
MagentoCustomerModelResourceModelCustomerFactory $customerFactory
)
{
$this->customer = $customer;
$this->customerFactory = $customerFactory;
}
...
...
$customerId = "1";
$customer = $this->customer->load($customerId);
$data = "customer attribute value";
$customerData = $customer->getDataModel();
$customerData->setCustomAttribute('customer_attribute_code',$data);
$customer->updateData($customerData);
$customerResource = $this->customerFactory->create();
$customerResource->saveAttribute($customer, 'customer_attribute_code');
1
This code not working in magento 2.2.3, please suggest if you have any alternate solution please share as I want to save custom customer address attribute value programmatically.
– Purushotam Sharma
Mar 28 '18 at 13:26
1
@Dinesh , Best Solution ever I got. Working for all types ofcustomer attributes
.
– TBS Mage
Jun 19 '18 at 7:07
2
@TBSMage, Thank you for your valuable comment :)
– Dinesh Yadav
Jun 19 '18 at 7:33
I have created attribute of type int, that is not saving if i use below code $customerData->setCustomAttribute('customer_check', 1);
– jafar pinjar
Aug 28 '18 at 8:50
add a comment |
I have got the solution
protected $customer;
protected $customerFactory;
public function __construct(
MagentoCustomerModelCustomer $customer
MagentoCustomerModelResourceModelCustomerFactory $customerFactory
)
{
$this->customer = $customer;
$this->customerFactory = $customerFactory;
}
...
...
$customerId = "1";
$customer = $this->customer->load($customerId);
$data = "customer attribute value";
$customerData = $customer->getDataModel();
$customerData->setCustomAttribute('customer_attribute_code',$data);
$customer->updateData($customerData);
$customerResource = $this->customerFactory->create();
$customerResource->saveAttribute($customer, 'customer_attribute_code');
I have got the solution
protected $customer;
protected $customerFactory;
public function __construct(
MagentoCustomerModelCustomer $customer
MagentoCustomerModelResourceModelCustomerFactory $customerFactory
)
{
$this->customer = $customer;
$this->customerFactory = $customerFactory;
}
...
...
$customerId = "1";
$customer = $this->customer->load($customerId);
$data = "customer attribute value";
$customerData = $customer->getDataModel();
$customerData->setCustomAttribute('customer_attribute_code',$data);
$customer->updateData($customerData);
$customerResource = $this->customerFactory->create();
$customerResource->saveAttribute($customer, 'customer_attribute_code');
answered Nov 7 '17 at 11:08
Dinesh Yadav
3,8201937
3,8201937
1
This code not working in magento 2.2.3, please suggest if you have any alternate solution please share as I want to save custom customer address attribute value programmatically.
– Purushotam Sharma
Mar 28 '18 at 13:26
1
@Dinesh , Best Solution ever I got. Working for all types ofcustomer attributes
.
– TBS Mage
Jun 19 '18 at 7:07
2
@TBSMage, Thank you for your valuable comment :)
– Dinesh Yadav
Jun 19 '18 at 7:33
I have created attribute of type int, that is not saving if i use below code $customerData->setCustomAttribute('customer_check', 1);
– jafar pinjar
Aug 28 '18 at 8:50
add a comment |
1
This code not working in magento 2.2.3, please suggest if you have any alternate solution please share as I want to save custom customer address attribute value programmatically.
– Purushotam Sharma
Mar 28 '18 at 13:26
1
@Dinesh , Best Solution ever I got. Working for all types ofcustomer attributes
.
– TBS Mage
Jun 19 '18 at 7:07
2
@TBSMage, Thank you for your valuable comment :)
– Dinesh Yadav
Jun 19 '18 at 7:33
I have created attribute of type int, that is not saving if i use below code $customerData->setCustomAttribute('customer_check', 1);
– jafar pinjar
Aug 28 '18 at 8:50
1
1
This code not working in magento 2.2.3, please suggest if you have any alternate solution please share as I want to save custom customer address attribute value programmatically.
– Purushotam Sharma
Mar 28 '18 at 13:26
This code not working in magento 2.2.3, please suggest if you have any alternate solution please share as I want to save custom customer address attribute value programmatically.
– Purushotam Sharma
Mar 28 '18 at 13:26
1
1
@Dinesh , Best Solution ever I got. Working for all types of
customer attributes
.– TBS Mage
Jun 19 '18 at 7:07
@Dinesh , Best Solution ever I got. Working for all types of
customer attributes
.– TBS Mage
Jun 19 '18 at 7:07
2
2
@TBSMage, Thank you for your valuable comment :)
– Dinesh Yadav
Jun 19 '18 at 7:33
@TBSMage, Thank you for your valuable comment :)
– Dinesh Yadav
Jun 19 '18 at 7:33
I have created attribute of type int, that is not saving if i use below code $customerData->setCustomAttribute('customer_check', 1);
– jafar pinjar
Aug 28 '18 at 8:50
I have created attribute of type int, that is not saving if i use below code $customerData->setCustomAttribute('customer_check', 1);
– jafar pinjar
Aug 28 '18 at 8:50
add a comment |
Some times, you may need to save multiple attributes at the same time. After go through the Magento code, I endup with this code. Here medicare_number and medicare_reference are custom attributes.
$customerModel = $this->_customerFactory->create();
$customerModel->getResource()->load($customerModel, $customerId);
$customerModel->setData('dob', $this->getRequest()->getParam('dob'))
->setData('gender', $this->getRequest()->getParam('gender'))
->setData('medicare_number', $this->getRequest()->getParam('medicare_number'))
->setData('medicare_reference', $this->getRequest()->getParam('medicare_reference'))
->setAttributeSetId(MagentoCustomerApiCustomerMetadataInterface::ATTRIBUTE_SET_ID_CUSTOMER);
$customerModel->getResource()->save($customerModel);
this is working in 2.2.5, tried dozens of other answers but none of them work, thank you!
– stetoc
Aug 30 '18 at 19:42
short version for working code is something like$customer->setData('my_attribute', 1234) ->setAttributeSetId(MagentoCustomerApiCustomerMetadataInterface::ATTRIBUTE_SET_ID_CUSTOMER)->getResource()->save($customer)
– stetoc
Aug 30 '18 at 19:43
add a comment |
Some times, you may need to save multiple attributes at the same time. After go through the Magento code, I endup with this code. Here medicare_number and medicare_reference are custom attributes.
$customerModel = $this->_customerFactory->create();
$customerModel->getResource()->load($customerModel, $customerId);
$customerModel->setData('dob', $this->getRequest()->getParam('dob'))
->setData('gender', $this->getRequest()->getParam('gender'))
->setData('medicare_number', $this->getRequest()->getParam('medicare_number'))
->setData('medicare_reference', $this->getRequest()->getParam('medicare_reference'))
->setAttributeSetId(MagentoCustomerApiCustomerMetadataInterface::ATTRIBUTE_SET_ID_CUSTOMER);
$customerModel->getResource()->save($customerModel);
this is working in 2.2.5, tried dozens of other answers but none of them work, thank you!
– stetoc
Aug 30 '18 at 19:42
short version for working code is something like$customer->setData('my_attribute', 1234) ->setAttributeSetId(MagentoCustomerApiCustomerMetadataInterface::ATTRIBUTE_SET_ID_CUSTOMER)->getResource()->save($customer)
– stetoc
Aug 30 '18 at 19:43
add a comment |
Some times, you may need to save multiple attributes at the same time. After go through the Magento code, I endup with this code. Here medicare_number and medicare_reference are custom attributes.
$customerModel = $this->_customerFactory->create();
$customerModel->getResource()->load($customerModel, $customerId);
$customerModel->setData('dob', $this->getRequest()->getParam('dob'))
->setData('gender', $this->getRequest()->getParam('gender'))
->setData('medicare_number', $this->getRequest()->getParam('medicare_number'))
->setData('medicare_reference', $this->getRequest()->getParam('medicare_reference'))
->setAttributeSetId(MagentoCustomerApiCustomerMetadataInterface::ATTRIBUTE_SET_ID_CUSTOMER);
$customerModel->getResource()->save($customerModel);
Some times, you may need to save multiple attributes at the same time. After go through the Magento code, I endup with this code. Here medicare_number and medicare_reference are custom attributes.
$customerModel = $this->_customerFactory->create();
$customerModel->getResource()->load($customerModel, $customerId);
$customerModel->setData('dob', $this->getRequest()->getParam('dob'))
->setData('gender', $this->getRequest()->getParam('gender'))
->setData('medicare_number', $this->getRequest()->getParam('medicare_number'))
->setData('medicare_reference', $this->getRequest()->getParam('medicare_reference'))
->setAttributeSetId(MagentoCustomerApiCustomerMetadataInterface::ATTRIBUTE_SET_ID_CUSTOMER);
$customerModel->getResource()->save($customerModel);
answered Aug 24 '18 at 4:48
user1554046
111
111
this is working in 2.2.5, tried dozens of other answers but none of them work, thank you!
– stetoc
Aug 30 '18 at 19:42
short version for working code is something like$customer->setData('my_attribute', 1234) ->setAttributeSetId(MagentoCustomerApiCustomerMetadataInterface::ATTRIBUTE_SET_ID_CUSTOMER)->getResource()->save($customer)
– stetoc
Aug 30 '18 at 19:43
add a comment |
this is working in 2.2.5, tried dozens of other answers but none of them work, thank you!
– stetoc
Aug 30 '18 at 19:42
short version for working code is something like$customer->setData('my_attribute', 1234) ->setAttributeSetId(MagentoCustomerApiCustomerMetadataInterface::ATTRIBUTE_SET_ID_CUSTOMER)->getResource()->save($customer)
– stetoc
Aug 30 '18 at 19:43
this is working in 2.2.5, tried dozens of other answers but none of them work, thank you!
– stetoc
Aug 30 '18 at 19:42
this is working in 2.2.5, tried dozens of other answers but none of them work, thank you!
– stetoc
Aug 30 '18 at 19:42
short version for working code is something like
$customer->setData('my_attribute', 1234) ->setAttributeSetId(MagentoCustomerApiCustomerMetadataInterface::ATTRIBUTE_SET_ID_CUSTOMER)->getResource()->save($customer)
– stetoc
Aug 30 '18 at 19:43
short version for working code is something like
$customer->setData('my_attribute', 1234) ->setAttributeSetId(MagentoCustomerApiCustomerMetadataInterface::ATTRIBUTE_SET_ID_CUSTOMER)->getResource()->save($customer)
– stetoc
Aug 30 '18 at 19:43
add a comment |
protected $customer;
protected $customerFactory;
public function __construct(
MagentoCustomerModelCustomer $customer
MagentoCustomerModelResourceModelCustomerFactory $customerFactory
)
{
$this->customer = $customer;
$this->customerFactory = $customerFactory;
}
...
...
$mobile="1234567890";
$custom = $this->_customerFactory ->create();
$custom = $custom->setWebsiteId($helperData->getWebsiteId());
$custom = $custom->loadByEmail("abc123@xyz.com");
$customerData = $custom->getDataModel();
$customerData->setCustomAttribute('custom_attribute code', $mobile);
$custom->updateData($customerData);
$custom->save();
add a comment |
protected $customer;
protected $customerFactory;
public function __construct(
MagentoCustomerModelCustomer $customer
MagentoCustomerModelResourceModelCustomerFactory $customerFactory
)
{
$this->customer = $customer;
$this->customerFactory = $customerFactory;
}
...
...
$mobile="1234567890";
$custom = $this->_customerFactory ->create();
$custom = $custom->setWebsiteId($helperData->getWebsiteId());
$custom = $custom->loadByEmail("abc123@xyz.com");
$customerData = $custom->getDataModel();
$customerData->setCustomAttribute('custom_attribute code', $mobile);
$custom->updateData($customerData);
$custom->save();
add a comment |
protected $customer;
protected $customerFactory;
public function __construct(
MagentoCustomerModelCustomer $customer
MagentoCustomerModelResourceModelCustomerFactory $customerFactory
)
{
$this->customer = $customer;
$this->customerFactory = $customerFactory;
}
...
...
$mobile="1234567890";
$custom = $this->_customerFactory ->create();
$custom = $custom->setWebsiteId($helperData->getWebsiteId());
$custom = $custom->loadByEmail("abc123@xyz.com");
$customerData = $custom->getDataModel();
$customerData->setCustomAttribute('custom_attribute code', $mobile);
$custom->updateData($customerData);
$custom->save();
protected $customer;
protected $customerFactory;
public function __construct(
MagentoCustomerModelCustomer $customer
MagentoCustomerModelResourceModelCustomerFactory $customerFactory
)
{
$this->customer = $customer;
$this->customerFactory = $customerFactory;
}
...
...
$mobile="1234567890";
$custom = $this->_customerFactory ->create();
$custom = $custom->setWebsiteId($helperData->getWebsiteId());
$custom = $custom->loadByEmail("abc123@xyz.com");
$customerData = $custom->getDataModel();
$customerData->setCustomAttribute('custom_attribute code', $mobile);
$custom->updateData($customerData);
$custom->save();
edited Jun 11 '18 at 11:26
answered Jun 11 '18 at 10:58
Sanjay Chauhan
697
697
add a comment |
add a comment |
You need to do it the strange Magento 2 way:-
public function __construct(
MagentoCustomerApiCustomerRepositoryInterface $customerRepository,
) {
$this->_customerRepository = $customerRepository;
}
public function execute()
{
$customer = $this->_customerRepository->getById($customerId);
$customer->setDob($data['dob'])
->setCustomAttribute('medicare_number',$data['medicare_number'])
->setCustomAttribute('medicare_reference',$data['medicare_reference'])
->setCustomAttribute('medicare_exp',$data['medicare_exp']);
$this->_customerRepository->save($customer);
}
add a comment |
You need to do it the strange Magento 2 way:-
public function __construct(
MagentoCustomerApiCustomerRepositoryInterface $customerRepository,
) {
$this->_customerRepository = $customerRepository;
}
public function execute()
{
$customer = $this->_customerRepository->getById($customerId);
$customer->setDob($data['dob'])
->setCustomAttribute('medicare_number',$data['medicare_number'])
->setCustomAttribute('medicare_reference',$data['medicare_reference'])
->setCustomAttribute('medicare_exp',$data['medicare_exp']);
$this->_customerRepository->save($customer);
}
add a comment |
You need to do it the strange Magento 2 way:-
public function __construct(
MagentoCustomerApiCustomerRepositoryInterface $customerRepository,
) {
$this->_customerRepository = $customerRepository;
}
public function execute()
{
$customer = $this->_customerRepository->getById($customerId);
$customer->setDob($data['dob'])
->setCustomAttribute('medicare_number',$data['medicare_number'])
->setCustomAttribute('medicare_reference',$data['medicare_reference'])
->setCustomAttribute('medicare_exp',$data['medicare_exp']);
$this->_customerRepository->save($customer);
}
You need to do it the strange Magento 2 way:-
public function __construct(
MagentoCustomerApiCustomerRepositoryInterface $customerRepository,
) {
$this->_customerRepository = $customerRepository;
}
public function execute()
{
$customer = $this->_customerRepository->getById($customerId);
$customer->setDob($data['dob'])
->setCustomAttribute('medicare_number',$data['medicare_number'])
->setCustomAttribute('medicare_reference',$data['medicare_reference'])
->setCustomAttribute('medicare_exp',$data['medicare_exp']);
$this->_customerRepository->save($customer);
}
answered yesterday
Dallas Clarke
71779
71779
add a comment |
add a comment |
Thanks for contributing an answer to Magento Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f200361%2fmagento-2-save-custom-customer-attribute-value-programmatically%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown