When I worked at a gaming store, we had this problem with a couple of people. Depending on how nice they were otherwise, and how well I knew them, I had a couple of different reactions. If they weren't people I knew, I would usually ignore it if it wasn't a real problem. You can't fix everyone, and if I offend somebody, they're not going to buy anything.
Some people would get the air freshener - we had a bottle of air freshener, and I'd spray it around the store (not at them, but where they'd been) while they were still in there. I always thought this was kind of rude, but then, they were bringing in their stink, which is more rude. But it also is a good indication that you stink. The problem was that the ones who didn't realize they stank weren't going to catch something like that.
I only told people they stank twice in the five years I worked there.
Once, it was a very unpleasant gentleman, who obviously had no social skills at all. Some people were playing Magic in the back, and one of them came up to me and asked me to deal with the guy. He was a big guy, and obviously hadn't bathed or washed his clothes in some time. The funk was extraordinary, and he was sitting in back, having sat down at their table without invitation, and talking about their cards, the game, et cetera while they were playing. The level of creepy and stinky, however, made action necessary. I asked to speak with him, and told him that he was bothering the other customers, and making them uncomfortable. He'd either need to leave the store or leave them alone. He got offended, and left. I didn't mind, and neither did the (paying) customers in the store.
The other time was kinda depressing. During the summer, the store often ends up as a babysitter for some of the local kids. This particular kid was maybe ten, and stank to high heaven. It wasn't B.O. - he smelled like a wet dog. Badly. It got to the point where none of the players were nice to him, since he stank so badly. He came up to me, really depressed, and asked why nobody was nice to him. I decided to bite the bullet, and tell him - he wasn't a bad kid, and would have been welcomed if his stench didn't make people want to leave the store.
"Well," I said. "It's probably because you don't smell very good. Do you have a dog?"
"Yeah," he says. "My dad gave him to me. I play with him all the time."
"I know. You smell like it. And that's probably why people aren't very nice to you."
I had a longer conversation with the kid, and it ended up that he had to do all his own laundry - his dad was never around - and didn't really know how. I gave him some instructions, and asked him to take a shower and put on clean clothes before he came back, and see how people treated him.
Unfortunately, I didn't see the kid again after that. After I stopped working there, I heard he came back again (about a year later), and didn't stink any more. Which made me feel better about the whole thing. I had worried about being too mean.