I’ve always wondered how they did that without ‘scanners’. Did food have price tags on it, back then? I can’t recall.
I do know that the checkout folks at our local have all the produce down to memory, and are almost always correct. Now and then, someone doesn’t know what an artichoke or parsnip is, and has to look up a code.

Don't let Cosmo Kramer get hold of one of those!
Every so often a cashier had to yell "Price check!" on an item that was unstamped or the cashier would yell "Hey Bob how much is this copy of Tiger Beat with David Cassidy on the cover?" and I'd yell louder "It's not for, me, Bob! It's for my sister! I'm just buying it for her!"
Most items had a sticker with a price on it. They used a price gun to apply the stickers. This was a job usually done by a teenage boy, while stocking the shelves. Some of those guys went really fast. You could hear the clicking of the price gun three aisles over.
The produce had no labels. The cashier had to know what it was, or ask the customer. They had a notebook with prices for all the produce. If it was priced by weight, she had to weigh it at the register. Yes, she. There was rarely a man on the register, unless it was a manager filling in.