getproduct func to search by id.