For working with an inventory/store/etc., I'm currently in the middle of making a "plugin" for Twine 2 / SugarCube 2 to make working with inventories easier. Here's a slightly older version of the Universal Inventory System (UInv) that I'm working on with a bugfix in it. The current version is too untested for even a pre-release at the moment, but the "UniversalInventorySystem.js" file has a little bugfix in it that you'll want to use to replace the JavaScript code in the two Twine files I've included (it should say v0.8.6b if you're looking at the right JavaScript code).
Universal_Inventory_System_v0.8.6b.zip (link expires on 5/11/'18)
Take a look at the included help file (UInv_Help_File.html) and let me know if you have any questions, problems, or suggestions. (You can PM me here.)
When it's actually ready for a full release I'll probably put it here.
Hope that helps! :-)