Player clicks a link to buy X, the script in the link says to add item X and adjust variable Y and Z.
Once you know how to make and reference a variable, and change another variable based on that, you basically know how to do this or just about anything else that can be done with the base editor. It's just a matter of stringing it all together, and that's the part that can be tedious with no real shortcuts.
You'll also need to put in global checks to ensure the amount they're spending doesn't take them below zero money and then give them the item anyway, and so on.