Shortening Increment ID length for Orders, Invoices, and Shipments
We recently had a client who needed to shorten the default Magento Increment ID length from the default 9 characters (eg 100000000) to 6 characters. This can be accomplished by modifying the “increment_pad_length” in the “eav_entity_type” for whatever entity you’re wanting to modify. Here is a screenshot of the resulting table:
If you’re wanting to change the number from which Magento starts counting orders/invoices/shipments, or wanting to change the prefix for those entities, check out this great post by Timothy at Elias: http://eliasinteractive.com/blog/magento-ecommerce-how-to-reset-all-test-order-information-and-set-unique-prefix-for-orders-invoices-shipments-and-credit-memos/
This entry was posted on Saturday, October 3rd, 2009 at 9:01 pm and is filed under Magento Development. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

November 29th, 2009 at 7:22 pm
Hi,
I posted this on the Magento forum just now as well. I followed the directions here to change the default 8 characters for invoice to 7, and I don’t think it worked for me. My credit card extension only allows 7 characters in the invoice field. So I changed invoice, invoice_item, and invoice_comment under the entity_type_code in my database to 7. I’m still getting an error when I try to post an order that says: “Declined: Field Format Error.” Any suggestions on this?
December 28th, 2009 at 4:28 pm
You should take a look in your sales_order_entity and look for rows with their entity_type_id equalling 16. If the increment_id field is 7 characters, then the directions worked.