Mage2SalesOrderPayment: Cc Avs Status is too long

Hi Mall,
While migrating the sales data on step7 we are experiencing the following issue:
Status: fail Message: Mage2SalesOrderPayment: Cc Avs Status is too long (maximum is 32 characters).<br/>Mage2SalesOrderPayment: Cc Avs Status is too long (maximum is 32 characters).<br/>Mage2SalesOrderPayment: Cc Avs Status is too long (maximum is 32 characters).<br/>Mage2SalesOrderPayment: Cc Avs Status is too long (maximum is 32 characters).<br/>Mage2SalesOrderPayment: Cc Avs Status is too long (maximum is 32 characters).<br/>Mage2SalesOrderPayment: Cc Avs Status is too long (maximum is 32 characters).<br/>Mage2SalesOrderPayment: Cc Avs Status is too long (maximum is 32 characters).<br/>Mage2SalesOrderPayment: Cc Avs Status is too long (maximum is 32 characters).<br/>Mage2SalesOrderPayment: Cc Avs Status is too long (maximum is 32 characters).<br/>Mage2SalesOrderPayment: Cc Avs Status is too long (maximum is 32 characters).<br/>Mage2SalesOrderPayment: Cc Avs Status is too long (maximum is 32 characters).<br/>Mage2SalesOrderPayment: Cc Avs Status is too long (maximum is 32 characters).<br/>Mage2SalesOrderPayment: Cc Avs Status is too long (maximum is 32 characters).
 
Sales data has been successfully migrated till the 6 October 2016. This is the date when we changed our payment gateway. After this date we are getting above error.
Could you please look at this and advice?
Many Thanks
Best Regards,
Asad
 
 
 

9 answers

Profile photo of Mall Staff 184060.00 $tone January 6, 2017
Public

Hi asadyar,
That issue come from your Magento1 database has bad data with new rule of Magento2 in the value of the field cc_avs_status in the table sales_flat_order_payment
To solve that, you can do steps as bellow:
-- Open the php file at the path: pub/ub-tool/protected/controllers/Step7Controller.php
and find to the code lines: 

if (in_array($key, array('po_number', 'cc_number_enc', 'last_trans_id', 'cc_status_description')) && strlen($val) > 32) {
$val = substr($val, 0, 32);
}

and replace it by code lines:

if (in_array($key, array('po_number', 'cc_number_enc', 'last_trans_id', 'cc_status_description', 'cc_avs_status')) && strlen($val) > 32) {
$val = substr($val, 0, 32);
}

And then, reset the step #7 and restart data migration in this step.
Regards,
Mall.

#1
Profile photo of asadyar 630.00 $tone January 11, 2017
Public

Hi Mall,
Thanks for your help! Your solution worked and I was able to successfully migrate all the data from M1 to M2. Now We are testing the migrated data.
Few thing I found in the migrated data:

  1. Some of the media files for products are set as “Hide from Product Page”. Can you tell us how to unchecked this for all products through program.
  2. All the products were set as disabled. However I select all and set as enabled. This issue is fixed.
  3. Payment information is missing for all orders it says: “The order was placed using CAD. is not available. You still can process offline actions.”

Could you please advice us on issue 1 and issue 3?
Thanks again!
Best Regards,
Asad

#2
Profile photo of Mall Staff 184060.00 $tone January 12, 2017
Public

Hi asadyar,

Some of the media files for products are set as “Hide from Product Page”. Can you tell us how to unchecked this for all products through program.

That because you have set excluded that in Magento1. To publish all your product images in Magento2, after migrated you can run bellow Sql in your Magento2 database migrated:
UPDATE catalog_product_entity_media_gallery SET disabled = 0;
UPDATE catalog_product_entity_media_gallery_value SET disabled = 0;

  1. Payment information is missing for all orders it says: “The order was placed using CAD. is not available. You still can process offline actions.”

I need a closer look to detect the root of issue as you mentioned. Let’s Provide me the admin and SSH credentials of your Magento2 now. I will check further and reply you later.
Regards,
Mall.

#3
Profile photo of Mall Staff 184060.00 $tone January 12, 2017
Public

Hi asadyar,

Payment extension is not installed on magento 2. Do you think it is due to this?

Do you install all default extensions of Magento2 core when installing?
 
Regards,
Mall.

#5

Please login or Register to Submit Answer

Written By

Comments