Item tooltips already say how much an NPC vendor will pay for an item. Just add beside it how much they'd charge for the item if it can be vendor purchased anywhere.

As for details like where you can purchase it, whether you can gather it, whether you can craft it, what mobs drop it, what quests or leves reward it, and so on, that's far too much to put in a tooltip. Even just where you can purchase the vendor sold items can be a long list for common ones. But perhaps an extension of the Search function could bring up this type of information.

It would be better than outside lookups, not only because it doesn't require people to leave the game every time they want to buy something, but because it could incorporate game data. For instance, if a Beast Tribe sells it, only show us that source if we have the reputation to be able to purchase it there. Same if the GC sells it, but only if we meet the right rank. If it's craftable, do we have the corresponding DoH class to the necessary level, etc. (Or perhaps list it anyway, but with a red "unavailable" icon next to it if we lack the reputation/rank/level or whatever.)

But in general, the vendor's selling price in the tooltip is more important than a full availability search. The tooltip would be enough to tell players whether it's worth looking up more specifics.