浏览文章

文章信息

Magento2 编程方式加载客户进行修改|magento2 客户属性设置 13570

$customerRepository = $this->objectManager->get('Magento\Customer\Api\CustomerRepositoryInterface');
$customer = $customerRepository->getById('customer_id');
$customer->setCustomAttribute("is_checked",'0');
$customerRepository->save($customer);


原创