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:

magento_shorten_increment_id


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/

2 Responses to “Shortening Increment ID length for Orders, Invoices, and Shipments”

  1. 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?

  2. 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.

Comment Form

For Code: Use the html code for < & >.  i.e. "&lt;YOUR_TAG&gt; ...your code... &lt;/YOUR_TAG&gt;"

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Call us at 417-597-3397, email us at sales@classyllama.com, or use this form to contact us:

  1. (required)
  2. (required)
 

cforms contact form by delicious:days

Full builds (design and development) start at $70k