I've been there, but I previously couldn't think of any intelligent commentary to offer pertinent to your situation. Now I have a couple things to toss out.
If you cannot deal amicably with a lot of people coming right up to you wanting to sell you stuff, don't go, because that's part of the fun and ambience. Make a plan to be at ease with it. You may have to say "no, thanks" several times to each one. Want to barter? Go for it. Don't pay full retail for anything in the Grand Bazaar. If you go to the spice bazaar, buy as much of the paprika as you can carry home. The stuff is a marvel. Don't buy the apple tea--it never tastes the same at home. And good etiquette demands that you not enter into bargaining unless you're truly interested in buying if the price is right. If you have to break it off because they can't go low enough, thank them for showing you their merchandise and for their time. That respect for the vendor as an individual will reflect credit on your country.
No one behaved in any remotely threatening or dishonest way toward me. Someone did, however, pick up the cruise ship card I had fumbled and bring it to me. Mighty kind of him.
One more thing. If you learn three words of intelligible Turkish you will set yourselves apart from just about every other visitor. Try:
merhaba (mare-ha-bah): hello
teşekkürler (tesh-ek-kurl-air): thank you
lütfen (lute-fen; the
ü is kind of tight, don't say like 'loot' as in pirate loot): please
evet (ev-et): yes
hayır (ha-yihr): no
Don't accent any syllable much; pronounce them all. This is easier to do if you speak French because French also requires this. They will not understand 'mur-HAW-buh'. Bang out each syllable no matter how weird that sounds, and get the vowels right. I don't speak Turkish but I've studied six other foreign languages and this is the fruit of my observation.
Read more. If you don't know how to pronounce them, write them down and when you get to Turkey and talk to someone Turkish, ask him or her to pronounce them for you so you know how a native speaker says it. I don't think many Turks would mind this at all, and I think most would consider it a pleasure to help. The most basic effort to greet Turks in Turkish will be appreciated. It will also mean they would like to talk to you (many in touristic areas speak English). While you should always consider the gender factor and avoid anything that seems like a come-on--maintain a certain formality and distance even when being friendly--it would also be a bad idea to shy away too much. Yes, they probably would like to sell you something, but they may also just be interested in speaking with someone who obviously has an open enough mind about Turkey to learn a word or two. They might ask what brought you to Turkey, whether you are enjoying yourself, even questions about politics. Turkey is a key US ally that made a national decision under a strong leader (Mustafa Kemal Ataturk) to become a secular republic and to look West rather than East. Most Turks I spoke with seemed very proud of their nation and the fact that it demonstrates that Islam can be fully compatible with modern life and democratic aspirations (which have made gradual progress in Turkey). Ataturk is venerated; I doubt you were planning to trash him, but that would be an immediate ticket to problems in Turkey.
Take time to learn the full history of Istanbul, from Constantinople to Byzantium to Istanbul, and the high points of the history of modern Turkey since Ataturk. It has some of the richest history on the European landmass, was once the nerve center of a mighty empire and one of the world's most cosmopolitan, educated cities. And yet World War II came and went, and not one Turkish soldier died in combat. Think on that.
You do not have to wear a headscarf in a mosque (and if you do not visit the Blue Mosque, you are cheating yourself of magnificence), but in my opinion you should. (You do have to dress conservatively and take off your shoes. If it's a wet day bring an extra pair of dry socks to any mosque because you may have to step on a wet rug in your socks.) My wife chose to put on a headscarf in the Blue Mosque, and I admit I was profoundly struck with respect and admiration for her seeing this. I felt it elevated her as a woman, because instead of needing to make a petty little statement, she showed her inner strength and dignity by choosing to respect the space she had chosen to visit. She looked more than equal; she looked like pure class. I felt like a very fortunate man, to have a wife of such character.
If someplace important is guarded by guys with automatic rifles in fatigues, don't freak out. That's the
Jandarma (national paramilitary police). For gods' sake don't point a camera at them, nor at anything related to police, military or government. Instead, say
merhaba to them in a respectful tone. I did that and they smiled, stroked their chins to show admiration for my beard, and said
salaam aleikum (you probably know this is an Islamic greeting from Arabic). They were very jazzed that I knew to say
w'aleikum salaam in reply, though I not only am not Muslim but am not a Person of the Book. Short version: an American who understands that not every Muslim is bin Laden's buddy, and brings an open mind, is a bit of a novelty and gets a pretty warm welcome.
Don't talk about Greece, Armenians or Kurdistan. If they do, hear them out without comment. You can't do right and can only do wrong. And you probably know not to show anyone the soles of your feet. Bad, very bad. I'm not sure whether the thumbs-up gesture is a bad one in Turkey, but it's a bad one in enough countries that it should simply never be used abroad, ditto for the OK gesture.