New answers tagged

1

By changing the code into this: $customer->setCustomAttribute('customer_attribute_code','value1,value2'); $this->customerRepository->save($customer); I've managed to save the custom customer multiselect attribute values


0

Use get() instead of getByEmail() Replace This line : $customer = $this->customerRepository->getByEmail($email); With this one : try { $customer = $this->customerRepository->get($email); } catch (\Exception $exception) { echo $exception->getMessage(); } The Above code will through Eception if ...


0

You may try like this one <?php namespace Vendor\Custom\Setup; use Magento\Eav\Setup\EavSetup; use Magento\Eav\Setup\EavSetupFactory; use Magento\Framework\Setup\InstallDataInterface; use Magento\Framework\Setup\ModuleContextInterface; use Magento\Framework\Setup\ModuleDataSetupInterface; use Magento\Eav\Model\Config; use Magento\Customer\Model\Customer;...


0

Not sure what you are getting back in curl response to match customer in Magento, I had given both Id & Email option here in code, please try below code, hope it will help: <?php namespace test\Org\Controller\Result; use Magento\Framework\App\Action\Context; use Magento\Framework\View\Result\PageFactory; use Magento\Framework\Controller\Result\...


0

In \Magento\Customer\Model\Validator\Name::isValidName Magento matches the first name of the customer with the regex pattern private const PATTERN_NAME = '/(?:[\p{L}\p{M}\,\-\_\.\'\s\d]){1,255}+/u'; /** * Check if name field is valid. * * @param string|null $nameValue * @return bool */ private function isValidName($nameValue) { if ($nameValue != ...


Top 50 recent answers are included