logic on cart button