add to cart functionality for a common cart implemented