I'm not that experienced in Twine yet, so there may be easier ways to do it, but...
One way would be to use variables. For example, $BoughtFood, $BoughtClothes, $BoughtMetal, $BoughtApothecary. If you have an initial Trader page that players can't return to, you can set those to 0 on that page, otherwise you'll have to figure out where (prior to shopping) it'd be best to do so. Then in your links (or first thing on the new page) you add in a
<<set $BoughtXXX to += 1>>
(with XXX being whichever they bought). Then when you list the links, you add an "if" condition.
For example,
Comments
One way would be to use variables. For example, $BoughtFood, $BoughtClothes, $BoughtMetal, $BoughtApothecary. If you have an initial Trader page that players can't return to, you can set those to 0 on that page, otherwise you'll have to figure out where (prior to shopping) it'd be best to do so. Then in your links (or first thing on the new page) you add in a
<<set $BoughtXXX to += 1>>
(with XXX being whichever they bought). Then when you list the links, you add an "if" condition.
For example,
That way, players won't see the link if they've already bought metal, since the variable in that case would be 1 instead of 0.
If you need to use the same variables later for another shopping trip, you'll have to re-set them to 0 prior to that one.
(Note: I mainly use Harlowe, so while I looked up the syntax for Sugarcube I'm not 100% sure I understood it completely ^^; )