purchase item details function.