Tags/topics: 
2
Answers
Vote up!
0
Vote down!

order number or ID pattern

I have been trying to generate a custom pattern for the order number my customers will see. My order number is made up of:

=> mmddyy-0001

Where mm = month i.e. 05 for may
dd = day i.e. 25 for 25th
yy = year i.e. 14 for 2014.

Any solution on how to generate this order number/id in drupal commerce and have this be the order number when someone purchase a product.

Thanks

Asked by: docans
on March 6, 2014

2 Answers

Vote up!
0
Vote down!

docans,

Two issues here. If you need the number for internal and/or invoicing reasons, you can use this module:

https://drupal.org/project/commerce_order_counter

(It allows you to create unique order numbering schemes).

BUT if you want to modify the URL on checkout, that gets a bit more interesting. There's a workaround mentioned here that uses inbound/outbound URL alters:

http://drupal.stackexchange.com/questions/60150/drupal-commerce-hide-or-...

Josh

Josh Miller
Answer by: Josh Miller
Posted: Mar 7, 2014
Vote up!
0
Vote down!

Hi Josh

All i am trying to do is to change the order number or id to the format above. I have installed the module and i still cant get it to work as it is supposed to.

Do you have any idea how i can approach this or any tutorial on the commerce_order_counter module

Thanks

Answer by: docans
Posted: Apr 2, 2014