Mage2SalesShipmentGrid: Customer Name cannot be bl

Hello, getting the following error when importing sales:
 
Mage2SalesShipmentGrid: Customer Name cannot be blank.
 
is there a way to bypass this?

7 answers

Profile photo of Mall Staff 184060.00 $tone November 19, 2016
Public

Hi hisglassworks,
Shipping_name vs customer_name are required fields in Magento 2 but your database missing values of these fields.
Let’s open the php file at the path `/home/qvv/www/mg2/ce212-dev/pub/ub-tool/protected/controllers/Step7Controller.php`
and find to the code line:

$model2->customer_name = $model->shipping_name;

and replace it by code lines:

$model2->customer_name = $model->shipping_name;
if (empty($model2->customer_name)) {
$model2->customer_name = 'N/A';
}

And contact me if you need further assistance!
Regards,
Mall.

#1
Profile photo of hisglassworks 170.00 $tone November 19, 2016
Public

Tried that but same error.  I ended up setting ALL customer names to N/A and that worked, so it must not be truly empty.  Is there any downside to setting them all to N/A?

#2
Profile photo of Mall Staff 184060.00 $tone November 19, 2016
Public

Hi hisglassworks,
The workaround I mentioned in previous reply referred to two required fields in Magento 2. Yet your M1 database lacked these two fields. Setting both to N/A as a tweak to pass the rules of M2. 
 This approach has no effect to your site, except for one thing that some entities in M2 still lacked such two fields (as per your M1 database)
Regards,
Mall.

#3
Profile photo of Mall Staff 184060.00 $tone November 28, 2016
Public

Hi thisisadam,

I too got the same error and also tried above solution but still unable to solve the problem. Can you help me to fix this issue

Let’s provide me the admin and SSH credentials of your Magento2 now. I will check further and help you out.
Regards,
Mall.
 

#5
Profile photo of Mall Staff 184060.00 $tone November 29, 2016
Public

Hi thisisadam,
Yeah, please follow my answers for your questions at here: https://www.ubertheme.com/question/customer-grid-reindex-status-processing/
Regards,
Mall.

#7

Please login or Register to Submit Answer

Written By

Comments