Ordernumber

  • Posts: 14
  • Thank you received: 0
10 years 1 month ago #176353

I want to have a ordernumber like this
YYYYMMDD[id order]

for example : 20141021001
Y = 2014
MM = 10
DD = 21
ID order -= 001

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

  • Posts: 12953
  • Thank you received: 1778
10 years 1 month ago #176359

Hello,
The solution will be to directly use the "Order number format" option through "Hikashop->System->Configuration->Main", as it's said on the documentation :

Order number format : This option enables you to set the format of order numbers. It is only available in commercial versions of HikaShop. By default, the order number uses letters and numbers interleaved together. this is represented here with the tag {automatic_code}. If you want to use the order number directly, you can use the tag {id}. In the tag id, you can specify the number of numbers with the size attribute. For example, {id size="5"} will result in 00123 for the order with the id 123. You can also use the date tag in order to insert date information. For example, {date format="m/Y"} will result in 02/11 for an order made in February 2011. You can combine them to generate pretty advanced order numbers like the format RE-{id size="5"}/{date format="m/Y"} used for German accounting which will result in RE-00123/02/11 for the order 123 made on February 2011.

Last edit: 10 years 1 month ago by Mohamed Thelji.

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

  • Posts: 14
  • Thank you received: 0
10 years 1 month ago #176433

I already read the documentation before i posted this question:

I already tried several codes.
{date format="m"}
{date format="d"}
{date format="d/m/y"}
{date format="y/m/d"}

These codes doesn't work.
How can i print the ordernumber "YYYMMDD" where
YYYY = current year
MM = cuurent month
DD = current day

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

  • Posts: 13201
  • Thank you received: 2322
10 years 1 month ago #176457

Hi,

Are you using only this code ? Only the date or you have id too ?

If only the date, that can't work because many orders will have the same order number.
You have to use the id too.

{id}-{date format="Ymd"}

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

Time to create page: 0.085 seconds
Powered by Kunena Forum