How would you like it, jings? Bet you wouldn't like being ignored as if you weren't even there, as if you were of no more account than an inanimate object, while you were trying to do your job – which includes being polite to customers and expecting them to be polite to you.
And, being a human being, a social animal, it probably makes a great deal of difference to the bearability of your job, which is hardly a thrilling one, if the people who stream past you during your shift have a smile for you and possibly even a friendly word or two.
Bluebell is right. Checkout assistants are not automata or slaves to be treated with disdain.