Either do item custom value or point value (I don't remember which), or item HP if they are invulnerable.
You could also make some sort of dummy item buyer that would check the gold before an item is bought, and then after, and get the difference * 1/the cost reduction in gameplay constants, and that would give the price of the sold item. Not sure if that's possible though.