Yes, a big aspect was how availability played a role. Things easily made in one spot might be quite cheap while even modest metal good might be extremely pricey if no local craftsman.Because there is no such thing as an off-the-shelf price in a pseudo-medieval economy. Even our modern economy isn’t as predictable as following the D&D rules for income and economics.
I find this sort of topic quite interesting because it gives me the opportunity to learn something.
So here’s some research on actual medieval prices for real, mundane things:
https://www.economics.utoronto.ca/munro5/SPICES1.htm
http://faculty.goucher.edu/eng240/medieval_prices.html
Check out the fluctuation in wheat prices:
http://www.medievalcoinage.com/prices/medievalprices.htm
Of course, the records are extremely sparse. But imagine what magic would cost, and how much it would fluctuate in such a world.
Few games try and deal with that in detail. Most of they deal with it at all use merchant rolls for profits.
The exceptions I have seen myself were for Traveller type games where world types created trade codes and rates with an attempt at logic or at least consistrncy.