- Posts: 50
- Thank you received: 2
How to pad ordernumber ID
14 years 7 months ago #38392
by obsolum
How to pad ordernumber ID was created by obsolum
Hi,
Currently I have my ordernumber format set to YYx where YY is the year (12) and xx is the order ID. However, I'd like to pad the id to 4 chars long, so instead of '121' I'll get '120001'. I have tried altering the order_id field with the zerofill attribute, and now the ID's are padded in the MySQL database but they still show up unpadded on the frontend.
Can I specify padding in the backend configuration?
Thanks!
Currently I have my ordernumber format set to YYx where YY is the year (12) and xx is the order ID. However, I'd like to pad the id to 4 chars long, so instead of '121' I'll get '120001'. I have tried altering the order_id field with the zerofill attribute, and now the ID's are padded in the MySQL database but they still show up unpadded on the frontend.
Can I specify padding in the backend configuration?
Thanks!
Please Log in or Create an account to join the conversation.
14 years 7 months ago #38505
by nicolas
Replied by nicolas on topic Re: How to pad ordernumber ID
Hi,
Yes, you can pad the id directly in the order number format option like that:
{id size="4"}
Yes, you can pad the id directly in the order number format option like that:
{id size="4"}
The following user(s) said Thank You: obsolum
Please Log in or Create an account to join the conversation.
14 years 7 months ago #38572
by obsolum
Replied by obsolum on topic Re: How to pad ordernumber ID
Again the solution is so simple 
Thanks a lot!
Thanks a lot!
Please Log in or Create an account to join the conversation.
Time to create page: 0.200 seconds