item details page buttons logic