Similarly to being in the restaurant industry, as a cashier, you may experience the same kind of rudeness where you work. Since I've worked in both, I know the luxury of having rude customers. However, I do not think they all know they're being annoying.
So, here are some tips how to not come off as rude to your next cashier.
1. Talking on the phone while checking out your items.
It's not that bad if you put the phone down and say, "Oh, excuse me one second" to the person you're on the phone with. I'm sure they'll understand. It's really bad when someone is on the phone and doesn't even acknowledge the nice customer service greeting you say to everyone. Please respond next time someone asks, "how are you doing?" because if not, it comes off as stuck-up.
2. Forgetting an item behind or your credit card in the car while it's busy.
I've gone back to get an item after all of my items are on the belt or desk, but only when it's not busy. You end up holding up the whole line and it looks like it's the cashiers' fault, but really, someone else doesn't have their stuff ready to go.
3. Not speaking to us at all.
We all have those days where we do not want to talk to anyone, but please be polite. This kind of goes along with the first one with talking on your phone, but always respond when your cashier says "hello" or "how are you doing?" to you.
4. Customers getting angry when you cannot sell them cigarettes or alcohol.
This may be the worst of them all. When someone forgets their ID or think they're too old to carry around an ID, maybe you should think twice about it. Technically, each company has a policy with who they have to card. Some stores or restaurants card everyone, even if they're 80. Others have policies, such as, if you look over 40 then it's OK.
Either way, be prepared or don't get your alcohol. It's that simple. Plus, if you're with a friend that's not 21, don't always expect to get alcohol, because that's not how it works at some stores. Oh, and if you try to convince a cashier, you're being even more of an a**hole. It's not worth losing a job over one person.
5. Customers getting mad when certain coupons won't scan or certain discounts don't go through as you 'thought.'
They get mad at the cashiers for this issue, but most of the time you cannot use the coupon because the person is not reading it correctly. In fine, big print, it will say "buy three, and get one free" and people still will ask why it will not work when you only bought two, for example. I wish I could give free items to everyone, but sadly, that's not how this works.
6. Talking to only your friends.
This may not come off as rude, but cashiers are humans too. Greet them. Make them feel like they exist.
Lastly, I'll just say it nice and simple, be a decent human being and try to understand certain circumstances. Most of the time, it's not the cashiers' fault (and same goes for servers).