I'm not sure if I understand your question. If you are talking about a code for products, it depends how are you handling your products.
Maybe You can use a code of 8 digits, for example 01010001. The first '01' are for the line (SHOES), the second '01' for a sub-category (SPORT SHOES) and the other 4 '0001' for a specific model (ADIDAS 3408 GREEN).
This kind helps to identify by the code the lines and sub-category and gives you 9999 codes per category. If this doesn't help you, please be a little more specific.
By two common phrases in his vocabulary, we know Hercule Poirot was a great Developer: his use of "the little grey cells" and "order and method".