item details button logic