Unique identifier for each ordered cocktail?
Is there an easy way to have Commerce auto-assign a number for each ordered item?
For example, in an imaginary online bar- a customer might order many cocktails and I would like each cocktail in the cart to be auto-assigned its own unique number (1, 2, 3, 4...). Each time a new (or existing) customer would place an order for a cocktail, Commerce would pick up where it last left off (5, 6, 7, 8....). That way I can track each ordered item throughout the cocktail mixing/delivery pipeline, simply by following the specific number like an SKU.
Comments
Do they have to be in
Do they have to be in order?
Products are order line items and line items have a unique ID for every line item. Could you use that?
Would it be possible to keep them in order?
We physically write down the order number during our production and delivery so it would be great if the number was short, and more intuitive than a random 10 digit ID. Having consecutive numbers would help out a lot. I was thinking of how I could implement the Serial Field module (http://drupal.org/project/serial) but wasn't sure how to go about it...
solved
Thanks! I looked into the line item ID and see that it is serial and it will work fine. Stop by for a drink!