0

I lost a few orders at Magento and I am recreating it manually, but I need to keep the old id. I do not have enough information to create all the lost orders, because this some orders id need to be skipped, because this I want to manually put the id of them.

I tried the mysql with the command:

update sales_flat_order set increment_id=100000180, entity_id=180 where entity_id=168;

Thanks in advance

1 Answer 1

3

THIS IS NO GOOD IDEA. PLAYING IN THE DATABASE IS ALWAYS A BAD IDEA

I'm not sure, whether I understand your question, there is no question mark in it, but I'll try.

The next increment id for an order can be found here: eav_entity_store so change the value to the one you want to have for the next order/invoice/whatever - 1.

Then your way is correct, sort our what IDs your orders need and then change the increment_ids and the entity_ids.

1
  • Thanks for you reply. I found this command: UPDATE eav_entity_store SET increment_last_id = '100000160' WHERE entity_store_id = 1; With this I can set the next order id. I'll record them and after return to the default.
    – Eduardo
    Commented Apr 1, 2014 at 14:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.