pulled out shop javascript functions

also theres a test followy thing in there that doesnt work