I wouldn't try to make them think I'm flattered. It's not flattering, because it's not really about any *genuine* interest in you as a person. It's a power thing.
I'd be cold and stern. And say, "I don't appreciate those sorts of comments. Do not make them. Did you have any business thing I could help you with?"
Honestly, this is a "rape culture" thing, this "let them know you are flattered." Why the hell should you be flattered that someone you don't even know wants to flirt with you? Or wants to be suggestive? That's not a compliment. That's nasty. If anything, the assumption that you might ever, in any way, welcome an overly friendly comment from a male is a bit of an insult, as if you have no discretion.
And I think that by *ever* indicating you are flattered, you simply reinforce their idea that it's ever appropriate to make those comments to ANY woman.
ETA: But if these are customers, and not colleagues, you may not be able to stop them. However, by suddenly becoming distant and cold when they do it, you might discourage them from doing it to someone else.
I'd also start educating my colleagues and coworkers, so that they can chime in as well.