Deloitte interview question

How did you do the add to cart functionality?