Change SKU from alphanumeric to numeric like!
Our company has thousands of SKUs, which currently have 1-6 digits followed by 10 letters that represent different color options, i.e. 1550-B = Item 1550 is black. B is for black. 165334-W = Product is white, etc.
Our new system will only allow numeric codes (and it will be easier for our employees to use 10 keys all).
We need advice on how to numerically enter the inventory number plus the numeric code that matches the color. We are trying to figure out how to distinguish a product from color and color. Currently SKUs end in numbers 1-9 + 0, so we disagree with that. Not sure if we can use the period. between numbers that might have worked, i.e. 1665.2 with 2 image black. Can periods or any other symbols be used in the number system? I wouldn't think not, so if you have any ideas you will be a lifesaver! Thanks!!
You need to display all the options that represent your letter suffixes and see how many combinations are used. (Yes, that will be a big task.) Then you know how much "room" you need between successive new SKUs and use that to convert the numeric part of the old one by multiplying it by a few tens to match that gap.
Example: Product 165534 has four colors: black, white, green and brown. B, W, GR and N, for example. But the 1550 comes in six colors: black, white, gray, blue with red stripes, blue with yellow stripes, and blue with white stripes. B, W, G, BR, BY and BW. Ok, this makes eight variations. Therefore, you can convert them like this:
- 165534-B => 1655340
- 165534-W => 1655341
- 165534-GR => 1655343
- 165534-N => 1655344
- 1550-B => 15500
- 1550-W => 15501
- 1550-G => 15502
- 1550-BR => 15505
- 1550-BY => 15506
- 1550-BW => 15507
Note that I multiplied the numeric part by 10 and then converted the alphabetical suffix to a unique numeric prefix. The first advantage of this is that the SKU xxxx1
will always be white. The second advantage is that product 165534 will still be 165534.
a source to share
If this is something similar to a system for fruits or vegetables in a grocery store (which is the closest I can think of from my head) then periods and special characters won't work - and this increases the likelihood of the operator if they have to start memorizing decimal encoding for things. Much of this depends on what products you are building the system for.
Can I combine the product number with the color numbers and just create one long numeric code? i.e:
1554643 - x product - white
1554644 - x product - black
a source to share
You can use decimals if your sku system uses "decimal" as the sku type, but I doubt this is happening.
Seems like the best way is
1) take all letters in sku, uppercase them 2) convert to ascii 3) sum them all 4) use this as the last 4 digits of sku, with leading zero
So 1555-WB => w = 87, b = 66, = 153
1555-WB = 1555(0153)
1555-WC = 1555(0154)
1555-ZZZZZZZZZZ = 1555(0900) (0900 i the max)
Since you have 6 digits in the front, you will always have the last 4 digits as your "offal" code until you get more than 6 ^ 10 products!
If you are not very lucky and find places where they collide, then you can always match the old sku by doing the same math again without having to manually maintain the somwhere mapping.
a source to share
Oh what a problem! If you have relatively few colors and an approach like staticsan should work fine. If you have a rich set of colors, you can map them to 12-bit or 24-bit RGB color codes. These are the same color codes that you would use in the design of web pages, such as CSS stylesheets.
So, for example, to make something red on a web page, you bump red to max and leave green and blue at zero: # FF0000 (24 bits) or # F00 (12 bits). The white of each color is bright or #FFFFFF (#FFF). Blacks have red, green and blue lights off: # 000000 (or # 000)
So, you can map your color names to such RGB values and then convert them to decimal and append them to the existing digital code.
You can map these color values to a single decimal number, or you can map them to separate R, G and B decimal numbers and concatenate them (more readable but plays out more digits). I think I would recommend a 4-digit value, which is the decimal equivalent of 12-bit RGB values.
If you are using Firefox, you can download the ColorZilla add-on and then use it to select colors on web pages to see what they display. Also see CSS Color Table .
a source to share