Cart: Fix undefined variable errors