Skip to content

After migration Order increment Id is Duplicate #731

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
rakeshdonga opened this issue Oct 16, 2019 · 11 comments
Closed

After migration Order increment Id is Duplicate #731

rakeshdonga opened this issue Oct 16, 2019 · 11 comments

Comments

@rakeshdonga
Copy link

i have migration done magento 1.9.3.7 to magento 2.3.3 with successfully
in admin i have 5 website and each website i have 3 storeview
like

  • Dutch
  • French
  • Italian

when i am place order in Dutch store my order id is #1000006164
and i am place order in French store my order id is #1000006164
also i am place order in Italian store my order id is #1000006164

why my order id is duplicate in after migration
in magento 1 order id is like

1000006164
2000006164
3000006164

and magento 2.3.2 all three store in order id is same

http://prntscr.com/pk2jrk

@victor-v-rad
Copy link
Collaborator

Hi @rakeshdonga

Thank you for reporting this issue. Internal ticket MC-21888 to process it

@rakeshdonga
Copy link
Author

@victor-v-rad
i have same issue facing in invoice,shipment ,creditmemo in duplicate id showing

@victor-v-rad
Copy link
Collaborator

it will be fixed for all

victor-v-rad added a commit that referenced this issue Oct 18, 2019
@victor-v-rad
Copy link
Collaborator

@rakeshdonga Fixed in 2.3-develop branch. Please test

@victor-v-rad
Copy link
Collaborator

victor-v-rad commented Oct 18, 2019

Prefix issue was fixed in Magento 2 magento/magento2#14063 Now prefix of increment id, like in Magento 1, depends on store view id where order was placed
Store 1 - Store View 1 (default) = order ID 10000001
Store 1 - Store View 2 = order ID 20000001
Store 2 - Store View 3 (default) = order ID 30000001
Store 2 - Store View 4 = order ID 40000001

Previously in Magento 2 for new orders you would have prefix from default store
Store 1 - Store View 1 (default) = order ID 10000001
Store 1 - Store View 2 = order ID 10000002
Store 2 - Store View 3 (default) = order ID 30000001
Store 2 - Store View 4 = order ID 30000002

BUT in Magento 2 increment id has store id + 9 digits, in according to \Magento\SalesSequence\Model\Sequence::DEFAULT_PATTERN
whereas Magento 1 increment id has store id + 8 digits

related #163

@rakeshdonga
Copy link
Author

@victor-v-rad
Thanks for solving
i want to know this issue solved in invoice,shipment and creditmemo also ?
and if i want to implement in my store then again migtation is need?

@victor-v-rad
Copy link
Collaborator

Yes fixed for invoice,shipment and creditmemo also. If you do not want to migrate again, you can fix it by changing values for sales_sequence_profile.prefix field and sales_sequence_meta.store_id field in migrated Magento 2 DB. You also can migrate only "SalesIncrement Step" step if you do not changed Magento 2 data after migration. Otherwise it is better to migrate data from scratch.

@rakeshdonga
Copy link
Author

rakeshdonga commented Oct 21, 2019

@victor-v-rad
i have same issue facing still also same issue facing in invoice,shipment and creditmemo
http://prntscr.com/pm2gk6

i have migration tool install using composer and i have checked my code it is not updated code

@victor-v-rad
Copy link
Collaborator

Please check that your code has these changes 09fba37

@rakeshdonga
Copy link
Author

rakeshdonga commented Nov 8, 2019

@victor-v-rad
Thank you for solving it
This is working fine my side, and just i will notify you when i have install data migration tool using composer then above code updated not coming i have manually add it

@victor-v-rad
Copy link
Collaborator

yes it is because it will be included into next 2.3.4v

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants