首页 > 解决方案 > Magento 2.3.3 客户送货地址名麻烦。“名字”是必需的

问题描述

概括

当我在客户注册/登录后尝试下订单时。Magento 2.3.3 显示“名字是必填字段错误。名字字段未显示。当我尝试在个人资料页面或后端创建送货地址时 - 显示名字字段但发生相同的验证错误!

数据迁移工具从 1.9.3.4 迁移数据

我在另一个版本的 magento 中读到了同样的问题,但没有找到解决方案

我尝试使用 eav_attribute 和 customer_eav_attribute。我把 is_visible=1 和 is_required=0 但它没有帮助

重现步骤

  1. 登录
  2. 结帐订单
  3. 填写运输表格
  4. 显示错误:请检查收货地址信息。“名字”是必需的。输入并重试。

截图

下订单 - 名字被隐藏

个人资料创建送货地址

后端 = 客户编辑 - 送货地址添加

标签: magentomagento2

解决方案


I have this issue on my end after migration from Magenro 1.9 to magento 2.3.3, for me this way is working : run on your mysql command line

select attribute_id,attribute_code from eav_attribute where attribute_code="firstname";

it will showing like this

enter image description here

then run the following query , don't forget to change attribute_id based on your end:

INSERT INTO `customer_form_attribute` (`form_code`, `attribute_id`) VALUES ('adminhtml_checkout', '5');
INSERT INTO `customer_form_attribute` (`form_code`, `attribute_id`) VALUES ('adminhtml_customer_address', '5');
INSERT INTO `customer_form_attribute` (`form_code`, `attribute_id`) VALUES ('adminhtml_customer_address', '20'); 
INSERT INTO `customer_form_attribute` (`form_code`, `attribute_id`) VALUES ('customer_address_edit', '5'); 
INSERT INTO `customer_form_attribute` (`form_code`, `attribute_id`) VALUES ('customer_address_edit', '20');
INSERT INTO `customer_form_attribute` (`form_code`, `attribute_id`) VALUES ('customer_register_address', '20'); 
INSERT INTO `customer_form_attribute` (`form_code`, `attribute_id`) VALUES ('customer_register_address', '5');

推荐阅读