Fixed misc syntax errors in cart controller

Doing some related development and ran into these.