Moved shoppingcart logic to require_ function (fixed session problem)