If you can't see the nametag because the person's hair is covering it, or their chest is never quite in your direct line of vision (and you're not gonna walk around the person to stare at the tag!), many shops are OK with not getting the name if you explain it. If it's mandatory, even if no nametag is present, what I usually do, assuming the shop went well, is say, "Oh, what was your name again? (As if they'd already given it to me.) You've been so helpful; thank you." That seems a bit more natural to me than just asking the name. If they haven't been so helpful, I might say "thank you" first, then ask for their name: Thank you; and your name is???"
Thankfully, most of the shops I do require a business card, so that solves that issue!
I learn something new every day, but not everyday!
I've learned to never trust spell-check or my phone's auto-fill feature.