0

The confirmations numbers(order increment ID) come through as 1000000936(6 zeros) when a customer places an order on our online store. I want to remove 3 of those zeros for all the coming order number so that we and the customer both see confirmation numbers like 1000936. Please tell me which table in Magento DB is to be edited and how or show me any other solution?

1 Answer 1

2

In eav_entity_type table,By default increment id length is 8. So Order Id has 8 0s.

You need to change the length value in eav_entity_type table.

First run this query SELECT * FROM eav_entity_type WHERE entity_type_id =5; entity_type_id 5 mentions sales/order.

By default increment_pad_length value is 8,you need to change it from 8 to 4 for your need.

change increment_pad_length value by run this query

UPDATE eav_entity_type SET increment_pad_length = 4 WHERE entity_type_id =5;

I think it will help you..

Also You can take a look at - https://www.classyllama.com/blog/m2-incrementid

8
  • Hi, tried this to no avail. Same old length of the increment ID still comes up. Commented Nov 6, 2020 at 11:40
  • Cleared cache & tried ? Commented Nov 6, 2020 at 11:47
  • Good point, I didn't clear the cache. Commented Nov 6, 2020 at 11:52
  • I see this untracked file on the server app/etc/.env.php.swp What should I do with this? Commented Nov 6, 2020 at 11:55
  • 1
    Following your answer appears to have worked except that the length of the increment ID remains. In the past, the order increment ID used to be something like 1000000876 while the new order increment ID comes up as 1001000877. I don't want first 100 How can I address this? Commented Nov 11, 2020 at 9:15

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.