The first thing to do is to record the corresponding items into the database and assign him a bar code, this is the basic work, all types of models of code scanners have different functions, some can directly print the bar code, this you can go to a professional store to consult.
If you buy a code scanner, there should be supporting software, of course, there should be supporting database software (need to pay for).