When in the bike buying process do you get a fitting done?
So , I'm shopping for my next bike, and I know I need to get a good fitting done. I seem to be developing knee pain on my current bike and that tells me the fit is off, I've never had one before. Hell, it's a 20+ year old $150 japanese steel frame beater I got from a shop, I'm not even sure if it's sized right for me period. So I don't want to get another bike and wind up sidelining myself cause I didn't get fitted right.
I'm not 100% on what bike I even want to get yet. So how should I proceed? Do I find a bike I generally like, and get fitted at time of purchase? Do I get one, get a basic fit, ride for a while and then have a retro-fit done? Or should I get fitted first to find out what bike to buy that fits me right?
Kind of at a loss and like I said, I don't wanna hurt my knees anymore and fitting sounds like it is gonna be crucial.