Code testing for cart functionality