Added checks to prevent shopping cart from rebuilding on every request.