What about having lists of Raw Goods, Survival Goods, Industrial Goods and Luxury Goods? Each list having things like iron and coal for raw, food and clothe for survival, tools and sails and boats for industrial, and gems and jewellery for luxury. Then the game would generate items from those lists randomly across the world, depending on type. Like survival goods would be scattered mostly evenly, while raw goods would have a higher gradient, like coal and iron mines, or large lumber forests. Industrial goods and luxury goods would be mostly in cities and larger towns where the artisans (time frame? medieval, early industrial, nebulously fantasty-era?) would be situated, with smaller villages having a tiny blacksmith or something that makes a minute number of industrial goods.
Then the price is dependent on the gradient of items, I.E. if there are a large number of goods the price is way down, if there are a lower number of that good then the price is higher. Then you add in traders who go from higher-good regions, buy the stuff, and then go to lower-good regions and sell it at profit, normalizing the price (to an extent, it'd still be profitable). The price would also depend on demand, a village may only have one blacksmith but that's all it needs. If it grew, more blacksmiths would be needed, raising demand for raw resources or for industrial goods before the blacksmiths open up.
That's one way to do it~ The list means you can abstract it so that it's easier to program. You can, of course, go detailed so that you ACTUALLY have iron and stuff, instead of how I'm imagining it where it's just termed "Raw Resources". The benefits of detailing is that you can have a higher gradient of iron in one area, coal in another, and a steel mill in a third, instead of all of those being "raw resources". But it'd be harder to program.