How to pad ordernumber ID

  • Posts: 50
  • Thank you received: 2
12 years 11 months ago #38392

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!

Please Log in or Create an account to join the conversation.

  • Posts: 83103
  • Thank you received: 13415
  • MODERATOR
12 years 11 months ago #38505

Hi,

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.

  • Posts: 50
  • Thank you received: 2
12 years 11 months ago #38572

Again the solution is so simple :-)

Thanks a lot!

Please Log in or Create an account to join the conversation.

Time to create page: 0.058 seconds
Powered by Kunena Forum