Update functionality of cart.