Mage2Salesrule: Discount Qty is too long (maximum is 12 characters)
How can I find which item is causing this error?
5 answers
Hi there,
How can I find which item is causing this error?
You could run SQL statement as followings in Magento1’s database:
SELECT * FROM `salesrule` WHERE LENGTH(`discount_qty`) > 12;
Regards,
Mall.
Perfect. Found them and now sales orders imported perfectly. Thanks for the quick reply.
For others with the same problem I fixed them under Promotions -> shopping cart rules
Under actions make sure discount qty is 12 or less
I am sure you could edit the database directly after doing the search posted above from Mall if you wanted.
Hi there,
Yeah, let’s continue with data migration in other steps. And contact me if you need further assistance.
Regards,
Mall.
@mall
Hi there
I am migrating it for a customer and on this step I got the same error
“sales migration error Discount Qty is too long”
And I ran the command with phpmyadmin
SELECT * FROM `salesrule` WHERE LENGTH(`discount_qty`) > 12;
I got this error:
Error
SQL query: Documentation
SELECT * FROM `salesrule` WHERE LENGTH(`discount_qty`) > 12 LIMIT 0, 25
MySQL said: Documentation
#1146 -- Table ‘db_name.salesrule’ doesn’t exist
How to solve it?
This is the only step I had a problem with
Hi Joao Calmon,
I am migrating it for a customer and on this step I got the same error
“sales migration error Discount Qty is too long”
Please check the migration log and provide me full details of that error message. I will help to check further and provide you with the SQL with correct table.
Regards,
Mall.